Changeset ff14aede in mainline
- Timestamp:
 - 2017-11-20T12:24:05Z (8 years ago)
 - Branches:
 - lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
 - Children:
 - 888238e9
 - Parents:
 - 306a36d
 - Location:
 - uspace
 - Files:
 - 
      
- 4 edited
 
- 
          
  drv/bus/usb/xhci/bus.c (modified) (1 diff)
 - 
          
  lib/usbhost/include/usb/host/hcd.h (modified) (1 diff)
 - 
          
  lib/usbhost/src/hcd.c (modified) (1 diff)
 - 
          
  lib/usbhost/src/usb2_bus.c (modified) (1 diff)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
uspace/drv/bus/usb/xhci/bus.c
r306a36d rff14aede 152 152 xhci_device_t *xhci_dev = xhci_device_get(dev); 153 153 154 /* Manage TT */ 155 if (dev->hub->speed == USB_SPEED_HIGH && usb_speed_is_11(dev->speed)) { 156 /* For LS devices under HS hub */ 157 /* TODO: How about SS hubs? */ 158 dev->tt.address = dev->hub->address; 159 dev->tt.port = dev->port; 160 } 161 else { 162 /* Inherit hub's TT */ 163 dev->tt = dev->hub->tt; 164 } 154 hcd_setup_device_tt(dev); 165 155 166 156 /* Calculate route string */  - 
      
uspace/lib/usbhost/include/usb/host/hcd.h
r306a36d rff14aede 103 103 104 104 extern int hcd_get_ep0_max_packet_size(uint16_t *, hcd_t *, device_t *); 105 extern void hcd_setup_device_tt(device_t *); 105 106 106 107 extern int hcd_send_batch(hcd_t *, device_t *, usb_target_t,  - 
      
uspace/lib/usbhost/src/hcd.c
r306a36d rff14aede 107 107 } 108 108 109 /** 110 * Setup devices Transaction Translation. 111 * 112 * This applies for Low/Full speed devices under High speed hub only. Other 113 * devices just inherit TT from the hub. 114 * 115 * Roothub must be handled specially. 116 */ 117 void hcd_setup_device_tt(device_t *dev) 118 { 119 if (!dev->hub) 120 return; 121 122 if (dev->hub->speed == USB_SPEED_HIGH && usb_speed_is_11(dev->speed)) { 123 /* For LS devices under HS hub */ 124 dev->tt.address = dev->hub->address; 125 dev->tt.port = dev->port; 126 } 127 else { 128 /* Inherit hub's TT */ 129 dev->tt = dev->hub->tt; 130 } 131 } 109 132 110 133 /** Prepare generic usb_transfer_batch and schedule it.  - 
      
uspace/lib/usbhost/src/usb2_bus.c
r306a36d rff14aede 199 199 usb_log_debug("Found new %s speed USB device.", usb_str_speed(dev->speed)); 200 200 201 if (dev->hub) { 202 /* Manage TT */ 203 if (dev->hub->speed == USB_SPEED_HIGH && usb_speed_is_11(dev->speed)) { 204 /* For LS devices under HS hub */ 205 /* TODO: How about SS hubs? */ 206 dev->tt.address = dev->hub->address; 207 dev->tt.port = dev->port; 208 } 209 else { 210 /* Inherit hub's TT */ 211 dev->tt = dev->hub->tt; 212 } 213 } 214 else { 201 if (!dev->hub) { 202 /* The device is the roothub */ 215 203 dev->tt = (usb_tt_address_t) { 216 204 .address = -1, 217 205 .port = 0, 218 206 }; 207 } else { 208 hcd_setup_device_tt(dev); 219 209 } 220 210  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  