Changeset 20a3465 in mainline for uspace/drv/bus/usb/usbhub/port.c


Ignore:
Timestamp:
2011-10-30T19:50:54Z (13 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3ce78580, 48902fa
Parents:
4c3ad56 (diff), 45bf63c (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:

Merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbhub/port.c

    r4c3ad56 r20a3465  
    288288        port->attached_device.fun = NULL;
    289289
    290         ret = usb_hc_unregister_device(&hub->connection,
    291             port->attached_device.address);
    292         if (ret != EOK) {
    293                 usb_log_warning("Failed to unregister address of the removed "
    294                     "device: %s.\n", str_error(ret));
    295         }
     290        ret = usb_hc_connection_open(&hub->connection);
     291        if (ret == EOK) {
     292                ret = usb_hc_unregister_device(&hub->connection,
     293                    port->attached_device.address);
     294                if (ret != EOK) {
     295                        usb_log_warning("Failed to unregister address of the "
     296                            "removed device: %s.\n", str_error(ret));
     297                }
     298                ret = usb_hc_connection_close(&hub->connection);
     299                if (ret != EOK) {
     300                        usb_log_warning("Failed to close hc connection %s.\n",
     301                            str_error(ret));
     302                }
     303
     304        } else {
     305                usb_log_warning("Failed to open hc connection %s.\n",
     306                    str_error(ret));
     307        }
     308
    296309        port->attached_device.address = -1;
    297310        fibril_mutex_unlock(&port->mutex);
Note: See TracChangeset for help on using the changeset viewer.