diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2013-03-18 12:05:08 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-18 19:05:58 -0400 |
commit | 4dd405a4b0969bfec4dc9959050b46d818b6549b (patch) | |
tree | 122109c425f0e8b18b32c289711b450091f7c2d4 /drivers/usb/host/ehci-hcd.c | |
parent | 6d5df8976266d8e40603601f7695537f9f3dc9e2 (diff) |
USB: EHCI: improve use of per-port status-change bits
This patch (as1634) simplifies some of the code associated with the
per-port change bits added in EHCI-1.1, and in particular it fixes a
bug in the logic of ehci_hub_status_data(). Even if the change bit
doesn't indicate anything happened on a particular port, we still have
to notify the core about changes to the suspend or reset status.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 303b0222cd6d..fcf8b940e867 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -758,7 +758,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) | |||
758 | /* remote wakeup [4.3.1] */ | 758 | /* remote wakeup [4.3.1] */ |
759 | if (status & STS_PCD) { | 759 | if (status & STS_PCD) { |
760 | unsigned i = HCS_N_PORTS (ehci->hcs_params); | 760 | unsigned i = HCS_N_PORTS (ehci->hcs_params); |
761 | u32 ppcd = 0; | 761 | u32 ppcd = ~0; |
762 | 762 | ||
763 | /* kick root hub later */ | 763 | /* kick root hub later */ |
764 | pcd_status = status; | 764 | pcd_status = status; |
@@ -775,7 +775,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) | |||
775 | int pstatus; | 775 | int pstatus; |
776 | 776 | ||
777 | /* leverage per-port change bits feature */ | 777 | /* leverage per-port change bits feature */ |
778 | if (ehci->has_ppcd && !(ppcd & (1 << i))) | 778 | if (!(ppcd & (1 << i))) |
779 | continue; | 779 | continue; |
780 | pstatus = ehci_readl(ehci, | 780 | pstatus = ehci_readl(ehci, |
781 | &ehci->regs->port_status[i]); | 781 | &ehci->regs->port_status[i]); |