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


Ignore:
Timestamp:
2011-12-11T20:17:05Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4c67e52
Parents:
c6d5f08
Message:

usbhub: Use usb_device_T provided hc_connection.

Start long transfer on control pipe before descriptor and settings manipulation.

File:
1 edited

Legend:

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

    rc6d5f08 rfb2ef35  
    288288        port->attached_device.fun = NULL;
    289289
    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));
     290        ret = usb_hc_unregister_device(&hub->usb_device->hc_conn,
     291            port->attached_device.address);
     292        if (ret != EOK) {
     293                usb_log_warning("Failed to unregister address of the "
     294                    "removed device: %s.\n", str_error(ret));
    307295        }
    308296
     
    438426
    439427        const int rc = usb_hc_new_device_wrapper(data->hub->usb_device->ddf_dev,
    440             &data->hub->connection, data->speed, enable_port_callback,
     428            &data->hub->usb_device->hc_conn, data->speed, enable_port_callback,
    441429            data->port, &new_address, NULL, NULL, &child_fun);
    442430
Note: See TracChangeset for help on using the changeset viewer.