Commit cbf5569a authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] USB: ehci-hcd micro-patch

This is a handful of one-liners, significantly:

  - don't disable "park" feature (faster).
  - cut'n'paste should have morphed "||" to "&&"
  - initialize qh as "live" (as now expected)

The "&&" was the most troublesome bug.  It could make
all kinds of things misbehave, not just those vt6202
issues some folks report.

The interesting bit about the "park" feature (NForce2
has it, maybe a few others) is that it made one disk
run 18% faster (according to hdparm).
parent f47eb147
......@@ -431,7 +431,7 @@ static int ehci_start (struct usb_hcd *hcd)
pci_set_mwi (ehci->hcd.pdev);
/* clear interrupt enables, set irq latency */
temp = readl (&ehci->regs->command) & 0xff;
temp = readl (&ehci->regs->command) & 0x0fff;
if (log2_irq_thresh < 0 || log2_irq_thresh > 6)
log2_irq_thresh = 0;
temp |= 1 << (16 + log2_irq_thresh);
......
......@@ -293,7 +293,7 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh, struct pt_regs *regs)
/* stop scanning when we reach qtds the hc is using */
} else if (likely (!stopped
|| HCD_IS_RUNNING (ehci->hcd.state))) {
&& HCD_IS_RUNNING (ehci->hcd.state))) {
break;
} else {
......@@ -690,12 +690,11 @@ qh_make (
/* NOTE: if (PIPE_INTERRUPT) { scheduler sets s-mask } */
/* init as halted, toggle clear, advance to dummy */
/* init as live, toggle clear, advance to dummy */
qh->qh_state = QH_STATE_IDLE;
qh->hw_info1 = cpu_to_le32 (info1);
qh->hw_info2 = cpu_to_le32 (info2);
qh_update (ehci, qh, qh->dummy);
qh->hw_token = cpu_to_le32 (QTD_STS_HALT);
usb_settoggle (urb->dev, usb_pipeendpoint (urb->pipe), !is_input, 1);
return qh;
}
......
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