Changeset 9620a54 in mainline for uspace/drv/bus/usb/xhci/hc.c
- Timestamp:
- 2017-10-29T10:51:59Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d33dc780
- Parents:
- 62f8025
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/hc.c
r62f8025 r9620a54 617 617 } 618 618 619 int hc_disable_slot(xhci_hc_t *hc, uint32_t slot_id) 620 { 619 int hc_disable_slot(xhci_hc_t *hc, xhci_device_t *dev) 620 { 621 int err; 621 622 assert(hc); 622 return xhci_cmd_sync_inline(hc, DISABLE_SLOT, .slot_id = slot_id); 623 624 if ((err = xhci_cmd_sync_inline(hc, DISABLE_SLOT, .slot_id = dev->slot_id))) { 625 return err; 626 } 627 628 /* Free the device context. */ 629 hc->dcbaa[dev->slot_id] = 0; 630 if (dev->dev_ctx) { 631 free32(dev->dev_ctx); 632 dev->dev_ctx = NULL; 633 } 634 635 /* Mark the slot as invalid. */ 636 dev->slot_id = 0; 637 638 return EOK; 623 639 } 624 640 … … 654 670 * we have to rely on reverse mapping on others. */ 655 671 if (!hc->speed_to_psiv[dev->base.speed]) { 656 usb_log_error("Device reported an usbspeed that cannot be mapped to HC port speed.");672 usb_log_error("Device reported an USB speed that cannot be mapped to HC port speed."); 657 673 return EINVAL; 658 674 }
Note:
See TracChangeset
for help on using the changeset viewer.