diff options
| -rw-r--r-- | drivers/usb/host/ehci-hcd.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index d9d53f289caf..8409e0705d63 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
| @@ -145,16 +145,6 @@ static int handshake (struct ehci_hcd *ehci, void __iomem *ptr, | |||
| 145 | return -ETIMEDOUT; | 145 | return -ETIMEDOUT; |
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | static int handshake_on_error_set_halt(struct ehci_hcd *ehci, void __iomem *ptr, | ||
| 149 | u32 mask, u32 done, int usec) | ||
| 150 | { | ||
| 151 | int error = handshake(ehci, ptr, mask, done, usec); | ||
| 152 | if (error) | ||
| 153 | ehci_to_hcd(ehci)->state = HC_STATE_HALT; | ||
| 154 | |||
| 155 | return error; | ||
| 156 | } | ||
| 157 | |||
| 158 | /* force HC to halt state from unknown (EHCI spec section 2.3) */ | 148 | /* force HC to halt state from unknown (EHCI spec section 2.3) */ |
| 159 | static int ehci_halt (struct ehci_hcd *ehci) | 149 | static int ehci_halt (struct ehci_hcd *ehci) |
| 160 | { | 150 | { |
| @@ -173,6 +163,22 @@ static int ehci_halt (struct ehci_hcd *ehci) | |||
| 173 | STS_HALT, STS_HALT, 16 * 125); | 163 | STS_HALT, STS_HALT, 16 * 125); |
| 174 | } | 164 | } |
| 175 | 165 | ||
| 166 | static int handshake_on_error_set_halt(struct ehci_hcd *ehci, void __iomem *ptr, | ||
| 167 | u32 mask, u32 done, int usec) | ||
| 168 | { | ||
| 169 | int error; | ||
| 170 | |||
| 171 | error = handshake(ehci, ptr, mask, done, usec); | ||
| 172 | if (error) { | ||
| 173 | ehci_halt(ehci); | ||
| 174 | ehci_to_hcd(ehci)->state = HC_STATE_HALT; | ||
| 175 | ehci_err(ehci, "force halt; handhake %p %08x %08x -> %d\n", | ||
| 176 | ptr, mask, done, error); | ||
| 177 | } | ||
| 178 | |||
| 179 | return error; | ||
| 180 | } | ||
| 181 | |||
| 176 | /* put TDI/ARC silicon into EHCI mode */ | 182 | /* put TDI/ARC silicon into EHCI mode */ |
| 177 | static void tdi_reset (struct ehci_hcd *ehci) | 183 | static void tdi_reset (struct ehci_hcd *ehci) |
| 178 | { | 184 | { |
