diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2008-10-06 11:25:53 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-10-17 17:41:03 -0400 |
commit | eafe5b99f2135488b21cf17a262c54997c44f784 (patch) | |
tree | 648a1c93460c7ae9b12624989cb8aca21d789114 /drivers/usb/host/ehci-hcd.c | |
parent | 2da41d5f6c036e7a6e496a7e601a685f8b87acb0 (diff) |
USB: EHCI: fix remote-wakeup support for ARC/TDI core
This patch (as1147) fixes the remote-wakeup support for EHCI
controllers using the ARC/TDI "embedded-TT" core. These controllers
turn off the RESUME bit by themselves when a port resume is complete;
hence we need to keep separate track of which ports are suspended or
in the process of resuming.
The patch also makes a couple of small improvements in ehci_irq(),
replacing reads of the command register with the value already stored
in a local variable.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Thomas Reitmayr <treitmayr@devbase.at>
CC: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 358df2a6c396..d343afacb0b0 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -706,7 +706,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) | |||
706 | pcd_status = status; | 706 | pcd_status = status; |
707 | 707 | ||
708 | /* resume root hub? */ | 708 | /* resume root hub? */ |
709 | if (!(ehci_readl(ehci, &ehci->regs->command) & CMD_RUN)) | 709 | if (!(cmd & CMD_RUN)) |
710 | usb_hcd_resume_root_hub(hcd); | 710 | usb_hcd_resume_root_hub(hcd); |
711 | 711 | ||
712 | while (i--) { | 712 | while (i--) { |
@@ -715,8 +715,11 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) | |||
715 | 715 | ||
716 | if (pstatus & PORT_OWNER) | 716 | if (pstatus & PORT_OWNER) |
717 | continue; | 717 | continue; |
718 | if (!(pstatus & PORT_RESUME) | 718 | if (!(test_bit(i, &ehci->suspended_ports) && |
719 | || ehci->reset_done [i] != 0) | 719 | ((pstatus & PORT_RESUME) || |
720 | !(pstatus & PORT_SUSPEND)) && | ||
721 | (pstatus & PORT_PE) && | ||
722 | ehci->reset_done[i] == 0)) | ||
720 | continue; | 723 | continue; |
721 | 724 | ||
722 | /* start 20 msec resume signaling from this port, | 725 | /* start 20 msec resume signaling from this port, |
@@ -731,9 +734,8 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) | |||
731 | 734 | ||
732 | /* PCI errors [4.15.2.4] */ | 735 | /* PCI errors [4.15.2.4] */ |
733 | if (unlikely ((status & STS_FATAL) != 0)) { | 736 | if (unlikely ((status & STS_FATAL) != 0)) { |
734 | dbg_cmd (ehci, "fatal", ehci_readl(ehci, | 737 | dbg_cmd(ehci, "fatal", cmd); |
735 | &ehci->regs->command)); | 738 | dbg_status(ehci, "fatal", status); |
736 | dbg_status (ehci, "fatal", status); | ||
737 | if (status & STS_HALT) { | 739 | if (status & STS_HALT) { |
738 | ehci_err (ehci, "fatal error\n"); | 740 | ehci_err (ehci, "fatal error\n"); |
739 | dead: | 741 | dead: |