Changeset a4e7e6e1 in mainline for uspace/drv/bus/usb/xhci/bus.c
- Timestamp:
- 2018-01-19T15:25:20Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 861b5d6
- Parents:
- c7d5189
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/bus.c
rc7d5189 ra4e7e6e1 87 87 88 88 /* Address device */ 89 if ((err = hc_address_device( bus->hc,dev, ep0)))89 if ((err = hc_address_device(dev, ep0))) 90 90 goto err_added; 91 91 … … 128 128 xhci_setup_endpoint_context(ep0, &ep_ctx); 129 129 130 if ((err = hc_update_endpoint( hc, dev->slot_id, 0, &ep_ctx)))130 if ((err = hc_update_endpoint(dev, 0, &ep_ctx))) 131 131 return err; 132 132 … … 238 238 239 239 /* Transition the device from the Addressed to the Configured state. */ 240 if ((err = hc_configure_device( bus->hc, dev->slot_id))) {240 if ((err = hc_configure_device(dev))) { 241 241 usb_log_warning("Failed to configure device " XHCI_DEV_FMT ".", XHCI_DEV_ARGS(*dev)); 242 242 return err; … … 263 263 264 264 /* Issue one HC command to simultaneously drop all endpoints except zero. */ 265 if ((err = hc_deconfigure_device( bus->hc, dev->slot_id))) {265 if ((err = hc_deconfigure_device(dev))) { 266 266 usb_log_warning("Failed to deconfigure device " XHCI_DEV_FMT ".", 267 267 XHCI_DEV_ARGS(*dev)); … … 312 312 { 313 313 int err; 314 xhci_bus_t *bus = bus_to_xhci_bus(endpoint_get_bus(ep_base));315 314 xhci_endpoint_t *ep = xhci_endpoint_get(ep_base); 316 315 xhci_device_t *dev = xhci_device_get(ep_base->device); … … 319 318 xhci_setup_endpoint_context(ep, &ep_ctx); 320 319 321 if ((err = hc_add_endpoint( bus->hc, dev->slot_id, xhci_endpoint_index(ep), &ep_ctx)))320 if ((err = hc_add_endpoint(dev, xhci_endpoint_index(ep), &ep_ctx))) 322 321 return err; 323 322 … … 330 329 static int endpoint_abort(endpoint_t *ep) 331 330 { 332 xhci_bus_t *bus = bus_to_xhci_bus(endpoint_get_bus(ep));333 331 xhci_device_t *dev = xhci_device_get(ep->device); 334 332 … … 337 335 if (ep->active_batch) { 338 336 if (dev->slot_id) { 339 const int err = hc_stop_endpoint( bus->hc, dev->slot_id, xhci_endpoint_dci(xhci_endpoint_get(ep)));337 const int err = hc_stop_endpoint(dev, xhci_endpoint_dci(xhci_endpoint_get(ep))); 340 338 if (err) { 341 339 usb_log_warning("Failed to stop endpoint %u of device " XHCI_DEV_FMT ": %s", … … 370 368 { 371 369 int err; 372 xhci_bus_t *bus = bus_to_xhci_bus(endpoint_get_bus(ep_base));373 370 xhci_endpoint_t *ep = xhci_endpoint_get(ep_base); 374 371 xhci_device_t *dev = xhci_device_get(ep_base->device); … … 379 376 if (dev->slot_id) { 380 377 381 if ((err = hc_drop_endpoint( bus->hc, dev->slot_id, xhci_endpoint_index(ep)))) {378 if ((err = hc_drop_endpoint(dev, xhci_endpoint_index(ep)))) { 382 379 usb_log_error("Failed to drop endpoint " XHCI_EP_FMT ": %s", XHCI_EP_ARGS(*ep), str_error(err)); 383 380 }
Note:
See TracChangeset
for help on using the changeset viewer.