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 16:05:58 -0700 |
commit | 4dd405a4b0969bfec4dc9959050b46d818b6549b (patch) | |
tree | 122109c425f0e8b18b32c289711b450091f7c2d4 /drivers/usb/host/ehci-hcd.c | |
parent | 6d5df8976266d8e40603601f7695537f9f3dc9e2 (diff) | |
download | lwn-4dd405a4b0969bfec4dc9959050b46d818b6549b.tar.gz lwn-4dd405a4b0969bfec4dc9959050b46d818b6549b.zip |
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) /* remote wakeup [4.3.1] */ if (status & STS_PCD) { unsigned i = HCS_N_PORTS (ehci->hcs_params); - u32 ppcd = 0; + u32 ppcd = ~0; /* kick root hub later */ pcd_status = status; @@ -775,7 +775,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) int pstatus; /* leverage per-port change bits feature */ - if (ehci->has_ppcd && !(ppcd & (1 << i))) + if (!(ppcd & (1 << i))) continue; pstatus = ehci_readl(ehci, &ehci->regs->port_status[i]); |