Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 1f1fa64 in mainline for uspace/drv/bus/usb/vhc/hub.c


Ignore:
Timestamp:
2014-07-28T21:53:11Z (7 years ago)
Author:
Agnieszka Tabaka <nufcia@…>
Branches:
lfn, master
Children:
c3b25985, f2f4c00
Parents:
cbfece7 (diff), 7eb6c96 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Make MAC address change possible on ethip side. Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/vhc/hub.c

    rcbfece7 r1f1fa64  
    9494{
    9595        ddf_fun_t *hc_dev = (ddf_fun_t *) arg;
    96 
    97         /*
    98          * Wait until parent device is properly initialized.
    99          */
    100         async_sess_t *sess;
    101         do {
    102                 sess = devman_device_connect(EXCHANGE_SERIALIZE,
    103                     ddf_fun_get_handle(hc_dev), 0);
    104         } while (!sess);
    105         async_hangup(sess);
    106 
    10796        int rc;
    10897
     
    114103
    115104        ddf_fun_t *hub_dev;
    116         rc = usb_hc_new_device_wrapper(ddf_fun_get_dev(hc_dev), &hc_conn, USB_SPEED_FULL,
    117             pretend_port_rest, NULL, NULL, &rh_ops, hc_dev, &hub_dev);
     105
     106        hub_dev = ddf_fun_create(ddf_fun_get_dev(hc_dev), fun_inner, NULL);
     107        if (hub_dev == NULL) {
     108                rc = ENOMEM;
     109                usb_log_fatal("Failed to create root hub: %s.\n",
     110                    str_error(rc));
     111                return rc;
     112        }
     113
     114        rc = usb_hc_new_device_wrapper(ddf_fun_get_dev(hc_dev), hub_dev,
     115            &hc_conn, USB_SPEED_FULL, pretend_port_rest, NULL, NULL, &rh_ops);
    118116        if (rc != EOK) {
    119117                usb_log_fatal("Failed to create root hub: %s.\n",
    120118                    str_error(rc));
     119                ddf_fun_destroy(hub_dev);
    121120        }
    122121
Note: See TracChangeset for help on using the changeset viewer.