aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-hub.c
diff options
context:
space:
mode:
authorBoris Todorov <boris.st.todorov@gmail.com>2011-07-11 12:03:33 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-11 09:36:36 -0800
commit00c37d53fdc0f671cc07228e0faf1938da741e68 (patch)
treecef20c3fa82fed62836a2448fee5f7e90be1d457 /drivers/usb/host/ehci-hub.c
parentcfaef012006eddcba833b33cb7953a68b36869c6 (diff)
downloadkernel_samsung_smdk4412-00c37d53fdc0f671cc07228e0faf1938da741e68.zip
kernel_samsung_smdk4412-00c37d53fdc0f671cc07228e0faf1938da741e68.tar.gz
kernel_samsung_smdk4412-00c37d53fdc0f671cc07228e0faf1938da741e68.tar.bz2
USB: EHCI: Fix test mode sequence
commit 77636c86a600b83de01719efad83567e46d7e8ce upstream. The sequence to put port in test mode is not complete. According EHCI specification all enabled ports must be put in suspend. Signed-off-by: Boris Todorov <boris.st.todorov@gmail.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ehci-hub.c')
-rw-r--r--drivers/usb/host/ehci-hub.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
index 0f3a724..f5d7fed 100644
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -1120,7 +1120,19 @@ static int ehci_hub_control (
if (!selector || selector > 5)
goto error;
ehci_quiesce(ehci);
+
+ /* Put all enabled ports into suspend */
+ while (ports--) {
+ u32 __iomem *sreg =
+ &ehci->regs->port_status[ports];
+
+ temp = ehci_readl(ehci, sreg) & ~PORT_RWC_BITS;
+ if (temp & PORT_PE)
+ ehci_writel(ehci, temp | PORT_SUSPEND,
+ sreg);
+ }
ehci_halt(ehci);
+ temp = ehci_readl(ehci, status_reg);
temp |= selector << 16;
ehci_writel(ehci, temp, status_reg);
break;