Changeset 75eb6735 in mainline
- Timestamp:
- 2011-09-23T09:28:16Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8d3cd30
- Parents:
- ea6de35
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhub/usbhub.c
rea6de35 r75eb6735 248 248 /* Get hub descriptor. */ 249 249 usb_log_debug("Retrieving descriptor\n"); 250 usb_pipe_t *control_pipe = &hub_info->usb_device->ctrl_pipe; 250 251 uint8_t serialized_descriptor[USB_HUB_MAX_DESCRIPTOR_SIZE]; 251 252 int opResult; 252 253 253 254 size_t received_size; 254 opResult = usb_request_get_descriptor( hub_info->control_pipe,255 opResult = usb_request_get_descriptor(control_pipe, 255 256 USB_REQUEST_TYPE_CLASS, USB_REQUEST_RECIPIENT_DEVICE, 256 257 USB_DESCTYPE_HUB, 0, 0, serialized_descriptor, … … 296 297 usb_log_debug("Powering port %zu.\n", port); 297 298 opResult = usb_hub_set_port_feature( 298 hub_info->control_pipe, 299 port, USB_HUB_FEATURE_PORT_POWER); 299 control_pipe, port, USB_HUB_FEATURE_PORT_POWER); 300 300 if (opResult != EOK) { 301 301 usb_log_error("Cannot power on port %zu: %s.\n", … … 368 368 usb_hub_status_t status) 369 369 { 370 usb_pipe_t *control_pipe = &hub_info->usb_device->ctrl_pipe; 370 371 if (status & USB_HUB_STATUS_OVER_CURRENT) { 371 372 /* Over-current detected on one or all ports, … … 375 376 for (port = 1; port <= hub_info->port_count; ++port) { 376 377 const int opResult = usb_hub_clear_port_feature( 377 hub_info->control_pipe, port, 378 USB_HUB_FEATURE_PORT_POWER); 378 control_pipe, port, USB_HUB_FEATURE_PORT_POWER); 379 379 if (opResult != EOK) { 380 380 usb_log_warning( … … 390 390 for (port = 1; port <= hub_info->port_count; ++port) { 391 391 const int opResult = usb_hub_set_port_feature( 392 hub_info->control_pipe, port, 393 USB_HUB_FEATURE_PORT_POWER); 392 control_pipe, port, USB_HUB_FEATURE_PORT_POWER); 394 393 if (opResult != EOK) { 395 394 usb_log_warning( … … 413 412 assert(hub_info->usb_device); 414 413 usb_log_debug("Global interrupt on a hub\n"); 415 usb_pipe_t *c trlpipe = &hub_info->usb_device->ctrl_pipe;414 usb_pipe_t *control_pipe = &hub_info->usb_device->ctrl_pipe; 416 415 417 416 usb_hub_status_t status; … … 419 418 /* NOTE: We can't use standard USB GET_STATUS request, because 420 419 * hubs reply is 4byte instead of 2 */ 421 const int opResult = usb_pipe_control_read( 422 ctrlpipe,&get_hub_status_request, sizeof(get_hub_status_request),420 const int opResult = usb_pipe_control_read(control_pipe, 421 &get_hub_status_request, sizeof(get_hub_status_request), 423 422 &status, sizeof(usb_hub_status_t), &rcvd_size); 424 423 if (opResult != EOK) { … … 450 449 * Just ACK the change. 451 450 */ 452 const int opResult = usb_hub_clear_feature( ctrlpipe,453 USB_HUB_FEATURE_C_HUB_LOCAL_POWER);451 const int opResult = usb_hub_clear_feature( 452 control_pipe, USB_HUB_FEATURE_C_HUB_LOCAL_POWER); 454 453 if (opResult != EOK) { 455 454 usb_log_error("Cannot clear hub power change flag: "
Note:
See TracChangeset
for help on using the changeset viewer.