blob: 60b3655a959e7b4d8e9b4733ad1f43005229deb9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
From stern@rowland.harvard.edu Wed Jun 28 08:20:42 2006
Date: Wed, 28 Jun 2006 11:20:41 -0400 (EDT)
From: Alan Stern <stern@rowland.harvard.edu>
To: Greg KH <greg@kroah.com>
Subject: usbcore: fixes for hub_port_resume
Message-ID: <Pine.LNX.4.44L0.0606281116010.6790-100000@iolanthe.rowland.org>
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>
---
drivers/usb/core/hub.c | 5 +++++
1 file changed, 5 insertions(+)
--- gregkh-2.6.orig/drivers/usb/core/hub.c
+++ gregkh-2.6/drivers/usb/core/hub.c
@@ -1882,7 +1882,12 @@ hub_port_resume(struct usb_hub *hub, int
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)
|