Changeset c0587d90 in mainline for uspace/drv/bus/usb/usbhub/usbhub.c
- Timestamp:
- 2011-09-23T13:44:12Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 442fa6b
- Parents:
- a590a23
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhub/usbhub.c
ra590a23 rc0587d90 277 277 size_t port; 278 278 for (port = 0; port < hub_info->port_count + 1; ++port) { 279 usb_hub_port_init(&hub_info->ports[port] );279 usb_hub_port_init(&hub_info->ports[port], port, control_pipe); 280 280 } 281 281 … … 290 290 usb_log_debug("Powering port %zu.\n", port); 291 291 opResult = usb_hub_set_port_feature( 292 control_pipe, port, USB_HUB_FEATURE_PORT_POWER);292 &hub_info->ports[port], USB_HUB_FEATURE_PORT_POWER); 293 293 if (opResult != EOK) { 294 294 usb_log_error("Cannot power on port %zu: %s.\n", … … 361 361 usb_hub_status_t status) 362 362 { 363 usb_pipe_t *control_pipe = &hub_info->usb_device->ctrl_pipe;364 363 if (status & USB_HUB_STATUS_OVER_CURRENT) { 365 364 /* Over-current detected on one or all ports, … … 369 368 for (port = 1; port <= hub_info->port_count; ++port) { 370 369 const int opResult = usb_hub_clear_port_feature( 371 control_pipe, port, USB_HUB_FEATURE_PORT_POWER);370 &hub_info->ports[port], USB_HUB_FEATURE_PORT_POWER); 372 371 if (opResult != EOK) { 373 372 usb_log_warning( … … 383 382 for (port = 1; port <= hub_info->port_count; ++port) { 384 383 const int opResult = usb_hub_set_port_feature( 385 control_pipe, port, USB_HUB_FEATURE_PORT_POWER);384 &hub_info->ports[port], USB_HUB_FEATURE_PORT_POWER); 386 385 if (opResult != EOK) { 387 386 usb_log_warning(
Note:
See TracChangeset
for help on using the changeset viewer.