Commit ac04e6ff authored by Sarah Sharp's avatar Sarah Sharp

xhci: Remove references to HC_STATE_HALT.

The xHCI driver doesn't ever test hcd->state for HC_STATE_HALT.  The USB
core recently stopped using it internally, so there's no point in setting
it in the driver.  We still need to set HC_STATE_RUNNING in order to make
it past the USB core's hcd->state check in register_roothub().
Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
parent bdfca502
...@@ -819,8 +819,7 @@ void xhci_stop_endpoint_command_watchdog(unsigned long arg) ...@@ -819,8 +819,7 @@ void xhci_stop_endpoint_command_watchdog(unsigned long arg)
if (ret < 0) { if (ret < 0) {
/* This is bad; the host is not responding to commands and it's /* This is bad; the host is not responding to commands and it's
* not allowing itself to be halted. At least interrupts are * not allowing itself to be halted. At least interrupts are
* disabled, so we can set HC_STATE_HALT and notify the * disabled. If we call usb_hc_died(), it will attempt to
* USB core. But if we call usb_hc_died(), it will attempt to
* disconnect all device drivers under this host. Those * disconnect all device drivers under this host. Those
* disconnect() methods will wait for all URBs to be unlinked, * disconnect() methods will wait for all URBs to be unlinked,
* so we must complete them. * so we must complete them.
...@@ -865,7 +864,6 @@ void xhci_stop_endpoint_command_watchdog(unsigned long arg) ...@@ -865,7 +864,6 @@ void xhci_stop_endpoint_command_watchdog(unsigned long arg)
} }
} }
spin_unlock(&xhci->lock); spin_unlock(&xhci->lock);
xhci_to_hcd(xhci)->state = HC_STATE_HALT;
xhci_dbg(xhci, "Calling usb_hc_died()\n"); xhci_dbg(xhci, "Calling usb_hc_died()\n");
usb_hc_died(xhci_to_hcd(xhci)); usb_hc_died(xhci_to_hcd(xhci));
xhci_dbg(xhci, "xHCI host controller is dead.\n"); xhci_dbg(xhci, "xHCI host controller is dead.\n");
...@@ -2113,7 +2111,6 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd) ...@@ -2113,7 +2111,6 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd)
xhci_warn(xhci, "WARNING: Host System Error\n"); xhci_warn(xhci, "WARNING: Host System Error\n");
xhci_halt(xhci); xhci_halt(xhci);
hw_died: hw_died:
xhci_to_hcd(xhci)->state = HC_STATE_HALT;
spin_unlock(&xhci->lock); spin_unlock(&xhci->lock);
return -ESHUTDOWN; return -ESHUTDOWN;
} }
......
...@@ -95,7 +95,6 @@ void xhci_quiesce(struct xhci_hcd *xhci) ...@@ -95,7 +95,6 @@ void xhci_quiesce(struct xhci_hcd *xhci)
* HC will complete any current and actively pipelined transactions, and * HC will complete any current and actively pipelined transactions, and
* should halt within 16 ms of the run/stop bit being cleared. * should halt within 16 ms of the run/stop bit being cleared.
* Read HC Halted bit in the status register to see when the HC is finished. * Read HC Halted bit in the status register to see when the HC is finished.
* XXX: shouldn't we set HC_STATE_HALT here somewhere?
*/ */
int xhci_halt(struct xhci_hcd *xhci) int xhci_halt(struct xhci_hcd *xhci)
{ {
...@@ -134,7 +133,7 @@ int xhci_start(struct xhci_hcd *xhci) ...@@ -134,7 +133,7 @@ int xhci_start(struct xhci_hcd *xhci)
} }
/* /*
* Reset a halted HC, and set the internal HC state to HC_STATE_HALT. * Reset a halted HC.
* *
* This resets pipelines, timers, counters, state machines, etc. * This resets pipelines, timers, counters, state machines, etc.
* Transactions will be terminated immediately, and operational registers * Transactions will be terminated immediately, and operational registers
...@@ -156,8 +155,6 @@ int xhci_reset(struct xhci_hcd *xhci) ...@@ -156,8 +155,6 @@ int xhci_reset(struct xhci_hcd *xhci)
command = xhci_readl(xhci, &xhci->op_regs->command); command = xhci_readl(xhci, &xhci->op_regs->command);
command |= CMD_RESET; command |= CMD_RESET;
xhci_writel(xhci, command, &xhci->op_regs->command); xhci_writel(xhci, command, &xhci->op_regs->command);
/* XXX: Why does EHCI set this here? Shouldn't other code do this? */
xhci_to_hcd(xhci)->state = HC_STATE_HALT;
ret = handshake(xhci, &xhci->op_regs->command, ret = handshake(xhci, &xhci->op_regs->command,
CMD_RESET, 0, 250 * 1000); CMD_RESET, 0, 250 * 1000);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment