Changeset 2aaba7e in mainline for uspace/drv
- Timestamp:
- 2018-01-20T18:23:39Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 21885c92
- Parents:
- 6271a34
- git-author:
- Ondřej Hlavatý <aearsis@…> (2018-01-20 18:21:06)
- git-committer:
- Ondřej Hlavatý <aearsis@…> (2018-01-20 18:23:39)
- Location:
- uspace/drv/bus/usb/xhci
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/device.c
r6271a34 r2aaba7e 178 178 /* Calculate route string */ 179 179 xhci_device_t *xhci_hub = xhci_device_get(dev->hub); 180 xhci_dev->tier = xhci_hub->tier + 1;181 180 xhci_dev->route_str = xhci_hub->route_str; 182 181 183 182 /* Roothub port is not part of the route string */ 184 if ( xhci_dev->tier >= 2) {185 const unsigned offset = 4 * ( xhci_dev->tier - 2);183 if (dev->tier >= 2) { 184 const unsigned offset = 4 * (dev->tier - 2); 186 185 xhci_dev->route_str |= (dev->port & 0xf) << offset; 187 186 xhci_dev->rh_port = xhci_hub->rh_port; -
uspace/drv/bus/usb/xhci/device.h
r6271a34 r2aaba7e 49 49 uint8_t rh_port; 50 50 51 /** USB Tier of the device */52 uint8_t tier;53 54 51 /** Route string */ 55 52 uint32_t route_str; -
uspace/drv/bus/usb/xhci/rh.c
r6271a34 r2aaba7e 98 98 /* Initialize route string */ 99 99 rh->device.route_str = 0; 100 rh->device.tier = 0;101 100 102 101 return EOK; … … 157 156 158 157 dev->hub = &port->rh->device.base; 158 dev->tier = 1; 159 159 dev->port = port - port->rh->ports + 1; 160 160
Note:
See TracChangeset
for help on using the changeset viewer.