From 706c69e46b6dd6c1b9d56d22ff555ca1f6d89240 Mon Sep 17 00:00:00 2001 From: Nikunj A Dadhania Date: Thu, 17 Jul 2014 12:43:29 +0530 Subject: xhci: fix port assignment Port assignment logic was generating negative port number Signed-off-by: Nikunj A Dadhania --- lib/libusb/usb-xhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libusb/usb-xhci.c') 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 */ -- cgit v1.1