Changeset 2aaba7e in mainline
- Timestamp:
- 2018-01-20T18:23:39Z (7 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
- Files:
-
- 7 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 -
uspace/lib/drv/generic/remote_usb.c
r6271a34 r2aaba7e 77 77 usb_device_desc_t tmp_desc; 78 78 79 const int ret = async_req_1_ 4(exch, DEV_IFACE_ID(USB_DEV_IFACE),79 const int ret = async_req_1_5(exch, DEV_IFACE_ID(USB_DEV_IFACE), 80 80 IPC_M_USB_GET_MY_DESCRIPTION, 81 81 (sysarg_t *) &tmp_desc.address, 82 (sysarg_t *) &tmp_desc.depth, 82 83 (sysarg_t *) &tmp_desc.speed, 83 84 &tmp_desc.handle, … … 117 118 async_answer_0(callid, ret); 118 119 } else { 119 async_answer_ 4(callid, EOK,120 async_answer_5(callid, EOK, 120 121 (sysarg_t) desc.address, 122 (sysarg_t) desc.depth, 121 123 (sysarg_t) desc.speed, 122 124 desc.handle, -
uspace/lib/drv/include/usb_iface.h
r6271a34 r2aaba7e 45 45 46 46 typedef struct { 47 usb_address_t address; 48 usb_speed_t speed; 49 devman_handle_t handle; 50 int iface; 47 usb_address_t address; /** Current USB address */ 48 uint8_t depth; /** Depth in the hub hiearchy */ 49 usb_speed_t speed; /** Speed of the device */ 50 devman_handle_t handle; /** Handle to DDF function of the HC driver */ 51 int iface; /** Interface set by multi interface driver, -1 if none */ 51 52 } usb_device_desc_t; 52 53 -
uspace/lib/usbhost/include/usb/host/bus.h
r6271a34 r2aaba7e 68 68 /* Invalid for the roothub device */ 69 69 unsigned port; 70 71 /** Hub under which this device is connected */ 70 72 struct device *hub; 73 74 /** USB Tier of the device */ 75 uint8_t tier; 71 76 72 77 /* Transaction translator */ -
uspace/lib/usbhost/src/ddf_helpers.c
r6271a34 r2aaba7e 164 164 165 165 dev->hub = hub; 166 dev->tier = hub->tier + 1; 166 167 dev->port = port; 167 168 dev->speed = speed; … … 242 243 *desc = (usb_device_desc_t) { 243 244 .address = dev->address, 245 .depth = dev->tier, 244 246 .speed = dev->speed, 245 247 .handle = ddf_fun_get_handle(fun),
Note:
See TracChangeset
for help on using the changeset viewer.