diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-20 02:49:41 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-20 02:49:41 +0200 |
commit | cea35899a02226b70baeee7e179d7a7c6e814b98 (patch) | |
tree | 19621a7ae67df5f398071791d52489a464b1b30a /drivers/usb/host/ohci-hub.c | |
parent | Merge 3.15-rc3 into usb-next (diff) | |
parent | Linux 3.15-rc5 (diff) | |
download | linux-cea35899a02226b70baeee7e179d7a7c6e814b98.tar.xz linux-cea35899a02226b70baeee7e179d7a7c6e814b98.zip |
Merge 3.15-rc5 into usb-next
We need these USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ohci-hub.c')
-rw-r--r-- | drivers/usb/host/ohci-hub.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c index 3d53208278b3..b4940de1eba3 100644 --- a/drivers/usb/host/ohci-hub.c +++ b/drivers/usb/host/ohci-hub.c @@ -90,6 +90,24 @@ __acquires(ohci->lock) dl_done_list (ohci); finish_unlinks (ohci, ohci_frame_no(ohci)); + /* + * Some controllers don't handle "global" suspend properly if + * there are unsuspended ports. For these controllers, put all + * the enabled ports into suspend before suspending the root hub. + */ + if (ohci->flags & OHCI_QUIRK_GLOBAL_SUSPEND) { + __hc32 __iomem *portstat = ohci->regs->roothub.portstatus; + int i; + unsigned temp; + + for (i = 0; i < ohci->num_ports; (++i, ++portstat)) { + temp = ohci_readl(ohci, portstat); + if ((temp & (RH_PS_PES | RH_PS_PSS)) == + RH_PS_PES) + ohci_writel(ohci, RH_PS_PSS, portstat); + } + } + /* maybe resume can wake root hub */ if (ohci_to_hcd(ohci)->self.root_hub->do_remote_wakeup || autostop) { ohci->hc_control |= OHCI_CTRL_RWE; |