diff options
author | Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> | 2014-07-17 12:43:29 +0530 |
---|---|---|
committer | Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> | 2014-07-17 12:43:29 +0530 |
commit | 706c69e46b6dd6c1b9d56d22ff555ca1f6d89240 (patch) | |
tree | 06250e1cbc9b749f63b0848f645458ff9cec10e0 | |
parent | f284ab3f03ae69a20e1ae966f6ddf76da33cbf72 (diff) | |
download | SLOF-706c69e46b6dd6c1b9d56d22ff555ca1f6d89240.zip SLOF-706c69e46b6dd6c1b9d56d22ff555ca1f6d89240.tar.gz SLOF-706c69e46b6dd6c1b9d56d22ff555ca1f6d89240.tar.bz2 |
xhci: fix port assignment
Port assignment logic was generating negative port number
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
-rw-r--r-- | lib/libusb/usb-xhci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libusb/usb-xhci.c b/lib/libusb/usb-xhci.c index 9ff3bd1..9549a4f 100644 --- a/lib/libusb/usb-xhci.c +++ b/lib/libusb/usb-xhci.c @@ -534,7 +534,7 @@ static bool xhci_alloc_dev(struct xhci_hcd *xhcd, uint32_t slot_id, uint32_t por /* Step 3 */ slot = xhci_get_slot_ctx(&xdev->in_ctx, ctx_size); - newport = port - XHCI_CONFIG_MAX_SLOT + 1; + newport = port + 1; val = LAST_CONTEXT(1) | SLOT_SPEED_SS | (newport << 16); /* FIXME speed, read from PS */ slot->field1 = cpu_to_le32(val); slot->field2 = cpu_to_le32(ROOT_HUB_PORT(newport)); /* FIXME how to get port no */ |