Changeset 32fb6bce in mainline for uspace/lib/usbhost/src/usb2_bus.c
- Timestamp:
- 2017-12-18T22:50:21Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7f70d1c
- Parents:
- 1ea0bbf
- git-author:
- Ondřej Hlavatý <aearsis@…> (2017-12-18 22:04:50)
- git-committer:
- Ondřej Hlavatý <aearsis@…> (2017-12-18 22:50:21)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/src/usb2_bus.c
r1ea0bbf r32fb6bce 205 205 206 206 usb2_bus_t *bus = (usb2_bus_t *) dev->bus; 207 hcd_t *hcd = (hcd_t *) bus->base.hcd;208 207 209 208 /* The default address is currently reserved for this device */ … … 231 230 232 231 uint16_t max_packet_size; 233 if ((err = hcd_get_ep0_max_packet_size(&max_packet_size, hcd, dev)))232 if ((err = hcd_get_ep0_max_packet_size(&max_packet_size, &bus->base, dev))) 234 233 goto err_address; 235 234 … … 238 237 239 238 usb_log_debug("Device(%d): Setting USB address.", address); 240 err = hcd_send_batch_sync(hcd,dev, usb2_default_target, USB_DIRECTION_OUT,239 err = bus_device_send_batch_sync(dev, usb2_default_target, USB_DIRECTION_OUT, 241 240 NULL, 0, *(uint64_t *)&set_address, "set address"); 242 241 if (err != 0) { … … 315 314 316 315 /* Read the device descriptor, derive the match ids */ 317 if ((err = hcd_d df_device_explore(dev))) {316 if ((err = hcd_device_explore(dev))) { 318 317 usb_log_error("Device(%d): Failed to explore device: %s", dev->address, str_error(err)); 319 318 release_address(bus, dev->address); … … 463 462 * @return Error code. 464 463 */ 465 int usb2_bus_init(usb2_bus_t *bus, hcd_t *hcd,size_t available_bandwidth)464 int usb2_bus_init(usb2_bus_t *bus, size_t available_bandwidth) 466 465 { 467 466 assert(bus); 468 467 469 bus_init(&bus->base, hcd,sizeof(device_t));468 bus_init(&bus->base, sizeof(device_t)); 470 469 bus->base.ops = &usb2_bus_ops; 471 470
Note:
See TracChangeset
for help on using the changeset viewer.