Changeset 2cf28b9 in mainline for uspace/drv/bus/usb/xhci/hc.c
- Timestamp:
- 2017-10-25T15:22:45Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 62558202
- Parents:
- f668d60
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/hc.c
rf668d60 r2cf28b9 657 657 int err = ENOMEM; 658 658 659 /* Although we have the precise PSIV value on devices of tier 1, 660 * we have to rely on reverse mapping on others. */ 661 if (!hc->speed_to_psiv[dev->base.speed]) { 662 usb_log_error("Device reported an usb speed that cannot be mapped to HC port speed."); 663 return EINVAL; 664 } 665 659 666 /* Setup and register device context */ 660 667 dev->dev_ctx = malloc32(sizeof(xhci_device_ctx_t)); … … 672 679 673 680 /* Initialize slot_ctx according to section 4.3.3 point 3. */ 674 XHCI_SLOT_ROOT_HUB_PORT_SET(ictx->slot_ctx, dev-> base.port); // FIXME: This should be port at RH681 XHCI_SLOT_ROOT_HUB_PORT_SET(ictx->slot_ctx, dev->rh_port); 675 682 XHCI_SLOT_CTX_ENTRIES_SET(ictx->slot_ctx, 1); 676 677 /* Attaching to root hub port, root string equals to 0. */ 678 XHCI_SLOT_ROUTE_STRING_SET(ictx->slot_ctx, 0); // FIXME: This is apparently valid in limited cases 683 XHCI_SLOT_ROUTE_STRING_SET(ictx->slot_ctx, dev->route_str); 684 XHCI_SLOT_SPEED_SET(ictx->slot_ctx, hc->speed_to_psiv[dev->base.speed]); 685 686 /* In a very specific case, we have to set also these. But before that, 687 * we need to refactor how TT is handled in libusbhost. */ 688 XHCI_SLOT_TT_HUB_SLOT_ID_SET(ictx->slot_ctx, 0); 689 XHCI_SLOT_TT_HUB_PORT_SET(ictx->slot_ctx, 0); 690 XHCI_SLOT_MTT_SET(ictx->slot_ctx, 0); 679 691 680 692 /* Copy endpoint 0 context and set A1 flag. */
Note:
See TracChangeset
for help on using the changeset viewer.