From 5233630fcdd6f7d415dcbed264031439cab73f9d Mon Sep 17 00:00:00 2001 From: Sarah Sharp Date: Thu, 16 Dec 2010 10:49:09 -0800 Subject: xhci: Change xhci_find_slot_id_by_port() API. xhci_find_slot_id_by_port() tries to map the port index to the slot ID for the USB device. In the future, there will be two xHCI roothubs, and their port indices will overlap. Therefore, xhci_find_slot_id_by_port() will need to use information in the roothub's usb_hcd structure to map the port index and roothub speed to the right slot ID. Add a new parameter to xhci_find_slot_id_by_port(), in order to pass in the roothub's usb_hcd structure. Signed-off-by: Sarah Sharp --- drivers/usb/host/xhci-ring.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/usb/host/xhci-ring.c') diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 7cea2483e59..7fe9aebd392 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -1213,7 +1213,8 @@ static void handle_port_status(struct xhci_hcd *xhci, temp &= ~PORT_PLS_MASK; temp |= PORT_LINK_STROBE | XDEV_U0; xhci_writel(xhci, temp, port_array[faked_port_index]); - slot_id = xhci_find_slot_id_by_port(xhci, port_id); + slot_id = xhci_find_slot_id_by_port(hcd, xhci, + faked_port_index); if (!slot_id) { xhci_dbg(xhci, "slot_id is zero\n"); goto cleanup; -- cgit v1.2.3-70-g09d2