Changeset 21885c92 in mainline
- Timestamp:
- 2018-01-20T18:27:53Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 24fcb8b
- Parents:
- 2aaba7e
- Location:
- uspace
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/device.c
r2aaba7e r21885c92 153 153 dev->is_hub = 1; 154 154 dev->num_ports = hub_desc.port_count; 155 dev->tt_think_time = 8 + 156 8 * !!(hub_desc.characteristics & HUB_CHAR_TT_THINK_8) + 157 16 * !!(hub_desc.characteristics & HUB_CHAR_TT_THINK_16); 155 156 if (dev->base.speed == USB_SPEED_HIGH) { 157 dev->tt_think_time = 8 + 158 8 * !!(hub_desc.characteristics & HUB_CHAR_TT_THINK_8) + 159 16 * !!(hub_desc.characteristics & HUB_CHAR_TT_THINK_16); 160 } 158 161 159 162 usb_log_debug2("Device(%u): recognised USB hub with %u ports", dev->base.address, dev->num_ports); -
uspace/lib/usb/include/usb/classes/hub.h
r2aaba7e r21885c92 71 71 uint8_t length; 72 72 73 /** Descriptor type (0x29 ). */73 /** Descriptor type (0x29 or 0x2a for superspeed hub). */ 74 74 uint8_t descriptor_type; 75 75 … … 116 116 #define HUB_CHAR_OC_PER_PORT_FLAG (1 << 3) 117 117 #define HUB_CHAR_NO_OC_FLAG (1 << 4) 118 119 /* These are invalid for superspeed hub */ 118 120 #define HUB_CHAR_TT_THINK_16 (1 << 5) 119 121 #define HUB_CHAR_TT_THINK_8 (1 << 6) … … 164 166 /** This request sets a value reported in the hub status. */ 165 167 USB_HUB_REQ_TYPE_SET_HUB_FEATURE = 0x20, 168 /** This request sets the value that the hub uses to determine the index into the Route String Index for the hub. */ 169 USB_HUB_REQ_TYPE_SET_HUB_DEPTH = 0x20, 166 170 /** This request sets a value reported in the port status. */ 167 USB_HUB_REQ_TYPE_SET_PORT_FEATURE = 0x23 171 USB_HUB_REQ_TYPE_SET_PORT_FEATURE = 0x23, 168 172 } usb_hub_bm_request_type_t; 169 173 … … 191 195 /** */ 192 196 USB_HUB_STOP_TT = 11, 197 /** USB 3+ only */ 198 USB_HUB_REQUEST_SET_HUB_DEPTH = 12, 193 199 } usb_hub_request_t; 194 200 -
uspace/lib/usb/include/usb/descriptor.h
r2aaba7e r21885c92 60 60 USB_DESCTYPE_HID_PHYSICAL = 0x23, 61 61 USB_DESCTYPE_HUB = 0x29, 62 USB_DESCTYPE_SSPEED_HUB = 0x2a, 62 63 USB_DESCTYPE_SSPEED_EP_COMPANION = 0x30 63 64 /* USB_DESCTYPE_ = */ -
uspace/lib/usbhost/src/utility.c
r2aaba7e r21885c92 150 150 }}; 151 151 152 const usb_descriptor_type_t type = device->speed >= USB_SPEED_SUPER 153 ? USB_DESCTYPE_SSPEED_HUB : USB_DESCTYPE_HUB; 154 152 155 const usb_device_request_setup_packet_t get_hub_desc = { 153 156 .request_type = SETUP_REQUEST_TYPE_DEVICE_TO_HOST … … 155 158 | USB_REQUEST_RECIPIENT_DEVICE, 156 159 .request = USB_DEVREQ_GET_DESCRIPTOR, \ 157 .value = uint16_host2usb( USB_DESCTYPE_HUB<< 8), \160 .value = uint16_host2usb(type << 8), \ 158 161 .length = sizeof(*desc), 159 162 };
Note:
See TracChangeset
for help on using the changeset viewer.