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


Ignore:
Timestamp:
2014-01-22T17:05:21Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
95d5dca
Parents:
64c96b9
Message:

usbhub: Add error codes to debug messages

File:
1 edited

Legend:

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

    r64c96b9 rb300d2b  
    416416        ret = usb_device_enumerate(exch, port->port_number);
    417417        if (ret != EOK) {
    418                 usb_log_error("Failed to enumerate device on port %u\n",
    419                     port->port_number);
    420                 if (port_enable(port, false) != EOK) {
    421                         usb_log_warning("Failed to disable port %u, NOT "
    422                             "releasing default address.\n", port->port_number);
     418                usb_log_error("Failed to enumerate device on port %u: %s",
     419                    port->port_number, str_error(ret));
     420                const int ret = port_enable(port, false);
     421                if (ret != EOK) {
     422                        usb_log_warning("Failed to disable port %u (%s), NOT "
     423                            "releasing default address.", port->port_number,
     424                            str_error(ret));
    423425                } else {
    424                         if (usb_release_default_address(exch) != EOK)
    425                                 usb_log_warning(
    426                                     "Failed to release default address\n");
     426                        const int ret = usb_release_default_address(exch);
     427                        if (ret != EOK)
     428                                usb_log_warning("Failed to release default "
     429                                    "address: %s", str_error(ret));
    427430                }
    428431        } else {
Note: See TracChangeset for help on using the changeset viewer.