summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2006-06-28 11:20:41 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-07-12 16:03:22 -0700
commit20307949469269ceea6262aaa306dcb55cf43b25 (patch)
treed4bfd90759bfc83098589c0628e928c2f0650a9a /drivers/usb
parentd8840d60218ac80c74af3b35adbc4cee93c25f18 (diff)
downloadblackbird-op-linux-20307949469269ceea6262aaa306dcb55cf43b25.tar.gz
blackbird-op-linux-20307949469269ceea6262aaa306dcb55cf43b25.zip
[PATCH] usbcore: fixes for hub_port_resume
This patch (as731) makes a couple of small fixes to the hub_port_resume routine: Don't return status >= 0 when an error occurs; Clear the port-change-suspend status indicator after resuming a device. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/core/hub.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 41531bba4321..26c8cb5f3e67 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -1882,7 +1882,12 @@ hub_port_resume(struct usb_hub *hub, int port1, struct usb_device *udev)
dev_dbg(hub->intfdev,
"port %d status %04x.%04x after resume, %d\n",
port1, portchange, devstatus, status);
+ if (status >= 0)
+ status = -ENODEV;
} else {
+ if (portchange & USB_PORT_STAT_C_SUSPEND)
+ clear_port_feature(hub->hdev, port1,
+ USB_PORT_FEAT_C_SUSPEND);
/* TRSMRCY = 10 msec */
msleep(10);
if (udev)
OpenPOWER on IntegriCloud