Changeset 7c3fb9b in mainline for uspace/drv/bus/usb/usbhub/usbhub.c
- Timestamp:
- 2018-05-17T08:29:01Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6ff23ff
- Parents:
- fac0ac7
- git-author:
- Jiri Svoboda <jiri@…> (2018-05-16 17:28:17)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-05-17 08:29:01)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhub/usbhub.c
rfac0ac7 r7c3fb9b 460 460 } 461 461 462 /* Set configuration. Use the configuration that was in 463 * usb_device->descriptors.configuration i.e. The first one. */ 462 /* 463 * Set configuration. Use the configuration that was in 464 * usb_device->descriptors.configuration i.e. The first one. 465 */ 464 466 errno_t opResult = usb_request_set_configuration( 465 467 usb_device_get_default_pipe(usb_device), … … 593 595 assert(status); 594 596 595 /* USB hub specific GET_PORT_STATUS request. See USB Spec 11.16.2.6 597 /* 598 * USB hub specific GET_PORT_STATUS request. See USB Spec 11.16.2.6 596 599 * Generic GET_STATUS request cannot be used because of the difference 597 * in status data size (2B vs. 4B)*/ 600 * in status data size (2B vs. 4B) 601 */ 598 602 const usb_device_request_setup_packet_t request = { 599 603 .request_type = USB_HUB_REQ_TYPE_GET_PORT_STATUS, … … 635 639 usb_hub_status_t status; 636 640 size_t rcvd_size; 637 /* NOTE: We can't use standard USB GET_STATUS request, because 638 * hubs reply is 4byte instead of 2 */ 641 /* 642 * NOTE: We can't use standard USB GET_STATUS request, because 643 * hubs reply is 4byte instead of 2 644 */ 639 645 const errno_t opResult = usb_pipe_control_read(control_pipe, 640 646 &get_hub_status_request, sizeof(get_hub_status_request), … … 666 672 667 673 if (status & USB_HUB_STATUS_C_LOCAL_POWER) { 668 /* NOTE: Handling this is more complicated. 674 /* 675 * NOTE: Handling this is more complicated. 669 676 * If the transition is from bus power to local power, all 670 677 * is good and we may signal the parent hub that we don't
Note:
See TracChangeset
for help on using the changeset viewer.