]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.3.4/ehci-fix-criterion-for-resuming-the-root-hub.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.3.4 / ehci-fix-criterion-for-resuming-the-root-hub.patch
1 From dc75ce9d929aabeb0843a6b1a4ab320e58ba1597 Mon Sep 17 00:00:00 2001
2 From: Alan Stern <stern@rowland.harvard.edu>
3 Date: Tue, 17 Apr 2012 15:24:15 -0400
4 Subject: EHCI: fix criterion for resuming the root hub
5
6 From: Alan Stern <stern@rowland.harvard.edu>
7
8 commit dc75ce9d929aabeb0843a6b1a4ab320e58ba1597 upstream.
9
10 This patch (as1542) changes the criterion ehci-hcd uses to tell when
11 it needs to resume the controller's root hub. A resume is needed when
12 a port status change is detected, obviously, but only if the root hub
13 is currently suspended.
14
15 Right now the driver tests whether the root hub is running, and that
16 is not the correct test. In particular, if the controller has died
17 then the root hub should not be restarted. In addition, some buggy
18 hardware occasionally requires the root hub to be running and
19 sending out SOF packets even while it is nominally supposed to be
20 suspended.
21
22 In the end, the test needs to be changed. Rather than checking whether
23 the root hub is currently running, the driver will now check whether
24 the root hub is currently suspended. This will yield the correct
25 behavior in all cases.
26
27 Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
28 CC: Peter Chen <B29397@freescale.com>
29 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
30
31 ---
32 drivers/usb/host/ehci-hcd.c | 2 +-
33 1 file changed, 1 insertion(+), 1 deletion(-)
34
35 --- a/drivers/usb/host/ehci-hcd.c
36 +++ b/drivers/usb/host/ehci-hcd.c
37 @@ -909,7 +909,7 @@ static irqreturn_t ehci_irq (struct usb_
38 pcd_status = status;
39
40 /* resume root hub? */
41 - if (!(cmd & CMD_RUN))
42 + if (ehci->rh_state == EHCI_RH_SUSPENDED)
43 usb_hcd_resume_root_hub(hcd);
44
45 /* get per-port change detect bits */