aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/core/hub.c
diff options
context:
space:
mode:
authorBalaji Rao <balajirrao@gmail.com>2007-11-22 01:58:14 +0530
committerGreg Kroah-Hartman <gregkh@suse.de>2008-02-01 14:34:52 -0800
commit90da096ee46b682011b7d549e52b81cf9742e60b (patch)
treef70838f277b69e82cb30525d96cad3728cc8b30b /drivers/usb/core/hub.c
parenteb0be47dbbdca133b1b94adc564297f25176b3ab (diff)
USB: force handover port to companion when hub_port_connect_change fails
This patch hands over the port to the companion when the hub_port_connect_change fails. Signed-off-by: Balaji Rao <balajirrao@gmail.com> Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r--drivers/usb/core/hub.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 1b17f636f49..24c411697d1 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2482,6 +2482,7 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1,
{
struct usb_device *hdev = hub->hdev;
struct device *hub_dev = hub->intfdev;
+ struct usb_hcd *hcd = bus_to_hcd(hdev->bus);
u16 wHubCharacteristics = le16_to_cpu(hub->descriptor->wHubCharacteristics);
int status, i;
@@ -2645,6 +2646,8 @@ loop:
done:
hub_port_disable(hub, port1, 1);
+ if (hcd->driver->relinquish_port && !hub->hdev->parent)
+ hcd->driver->relinquish_port(hcd, port1);
}
static void hub_events(void)