Skip to content

Commit

Permalink
Revert "USB: EHCI: don't check DMA values in QH overlays"
Browse files Browse the repository at this point in the history
This reverts commit 0319f99, which is commit
feca774 upstream.

It shouldn't have gone into this stable release.

Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Joseph Salisbury <joseph.salisbury@canonical.com>
Cc: Stephen Thirlwall <sdt@dr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
gregkh committed Mar 28, 2013
1 parent ef4fb40 commit 28de3b3
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions drivers/usb/host/ehci-q.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ qh_refresh (struct ehci_hcd *ehci, struct ehci_qh *qh)
* qtd is updated in qh_completions(). Update the QH
* overlay here.
*/
if (qh->hw->hw_token & ACTIVE_BIT(ehci)) {
if (cpu_to_hc32(ehci, qtd->qtd_dma) == qh->hw->hw_current) {
qh->hw->hw_qtd_next = qtd->hw_next;
qtd = NULL;
}
Expand Down Expand Up @@ -450,19 +450,11 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh)
else if (last_status == -EINPROGRESS && !urb->unlinked)
continue;

/*
* If this was the active qtd when the qh was unlinked
* and the overlay's token is active, then the overlay
* hasn't been written back to the qtd yet so use its
* token instead of the qtd's. After the qtd is
* processed and removed, the overlay won't be valid
* any more.
*/
if (state == QH_STATE_IDLE &&
qh->qtd_list.next == &qtd->qtd_list &&
(hw->hw_token & ACTIVE_BIT(ehci))) {
/* qh unlinked; token in overlay may be most current */
if (state == QH_STATE_IDLE
&& cpu_to_hc32(ehci, qtd->qtd_dma)
== hw->hw_current) {
token = hc32_to_cpu(ehci, hw->hw_token);
hw->hw_token &= ~ACTIVE_BIT(ehci);

/* An unlink may leave an incomplete
* async transaction in the TT buffer.
Expand Down

0 comments on commit 28de3b3

Please sign in to comment.