diff options
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 5 | ||||
-rw-r--r-- | drivers/usb/host/xhci.c | 5 |
2 files changed, 2 insertions, 8 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 3264d6275bf2..6bca2526d54a 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -819,8 +819,7 @@ void xhci_stop_endpoint_command_watchdog(unsigned long arg) | |||
819 | if (ret < 0) { | 819 | if (ret < 0) { |
820 | /* This is bad; the host is not responding to commands and it's | 820 | /* This is bad; the host is not responding to commands and it's |
821 | * not allowing itself to be halted. At least interrupts are | 821 | * not allowing itself to be halted. At least interrupts are |
822 | * disabled, so we can set HC_STATE_HALT and notify the | 822 | * disabled. If we call usb_hc_died(), it will attempt to |
823 | * USB core. But if we call usb_hc_died(), it will attempt to | ||
824 | * disconnect all device drivers under this host. Those | 823 | * disconnect all device drivers under this host. Those |
825 | * disconnect() methods will wait for all URBs to be unlinked, | 824 | * disconnect() methods will wait for all URBs to be unlinked, |
826 | * so we must complete them. | 825 | * so we must complete them. |
@@ -865,7 +864,6 @@ void xhci_stop_endpoint_command_watchdog(unsigned long arg) | |||
865 | } | 864 | } |
866 | } | 865 | } |
867 | spin_unlock(&xhci->lock); | 866 | spin_unlock(&xhci->lock); |
868 | xhci_to_hcd(xhci)->state = HC_STATE_HALT; | ||
869 | xhci_dbg(xhci, "Calling usb_hc_died()\n"); | 867 | xhci_dbg(xhci, "Calling usb_hc_died()\n"); |
870 | usb_hc_died(xhci_to_hcd(xhci)); | 868 | usb_hc_died(xhci_to_hcd(xhci)); |
871 | xhci_dbg(xhci, "xHCI host controller is dead.\n"); | 869 | xhci_dbg(xhci, "xHCI host controller is dead.\n"); |
@@ -2113,7 +2111,6 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd) | |||
2113 | xhci_warn(xhci, "WARNING: Host System Error\n"); | 2111 | xhci_warn(xhci, "WARNING: Host System Error\n"); |
2114 | xhci_halt(xhci); | 2112 | xhci_halt(xhci); |
2115 | hw_died: | 2113 | hw_died: |
2116 | xhci_to_hcd(xhci)->state = HC_STATE_HALT; | ||
2117 | spin_unlock(&xhci->lock); | 2114 | spin_unlock(&xhci->lock); |
2118 | return -ESHUTDOWN; | 2115 | return -ESHUTDOWN; |
2119 | } | 2116 | } |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 8dfa67ff5fac..63b8db5275e9 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -95,7 +95,6 @@ void xhci_quiesce(struct xhci_hcd *xhci) | |||
95 | * HC will complete any current and actively pipelined transactions, and | 95 | * HC will complete any current and actively pipelined transactions, and |
96 | * should halt within 16 ms of the run/stop bit being cleared. | 96 | * should halt within 16 ms of the run/stop bit being cleared. |
97 | * Read HC Halted bit in the status register to see when the HC is finished. | 97 | * Read HC Halted bit in the status register to see when the HC is finished. |
98 | * XXX: shouldn't we set HC_STATE_HALT here somewhere? | ||
99 | */ | 98 | */ |
100 | int xhci_halt(struct xhci_hcd *xhci) | 99 | int xhci_halt(struct xhci_hcd *xhci) |
101 | { | 100 | { |
@@ -134,7 +133,7 @@ int xhci_start(struct xhci_hcd *xhci) | |||
134 | } | 133 | } |
135 | 134 | ||
136 | /* | 135 | /* |
137 | * Reset a halted HC, and set the internal HC state to HC_STATE_HALT. | 136 | * Reset a halted HC. |
138 | * | 137 | * |
139 | * This resets pipelines, timers, counters, state machines, etc. | 138 | * This resets pipelines, timers, counters, state machines, etc. |
140 | * Transactions will be terminated immediately, and operational registers | 139 | * Transactions will be terminated immediately, and operational registers |
@@ -156,8 +155,6 @@ int xhci_reset(struct xhci_hcd *xhci) | |||
156 | command = xhci_readl(xhci, &xhci->op_regs->command); | 155 | command = xhci_readl(xhci, &xhci->op_regs->command); |
157 | command |= CMD_RESET; | 156 | command |= CMD_RESET; |
158 | xhci_writel(xhci, command, &xhci->op_regs->command); | 157 | xhci_writel(xhci, command, &xhci->op_regs->command); |
159 | /* XXX: Why does EHCI set this here? Shouldn't other code do this? */ | ||
160 | xhci_to_hcd(xhci)->state = HC_STATE_HALT; | ||
161 | 158 | ||
162 | ret = handshake(xhci, &xhci->op_regs->command, | 159 | ret = handshake(xhci, &xhci->op_regs->command, |
163 | CMD_RESET, 0, 250 * 1000); | 160 | CMD_RESET, 0, 250 * 1000); |