This patch (as1274) simplifies the counting of transaction-error
retries. Now we will count up from 0 to QH_XACTERR_MAX instead of
down from QH_XACTERR_MAX to 0.
The patch also fixes a small bug: qh->xacterr was not getting
initialized for interrupt endpoints.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Matthijs Kooijman <matthijs@stdin.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
*/
if ((token & QTD_STS_XACT) &&
QTD_CERR(token) == 0 &&
*/
if ((token & QTD_STS_XACT) &&
QTD_CERR(token) == 0 &&
+ ++qh->xacterrs < QH_XACTERR_MAX &&
!urb->unlinked) {
ehci_dbg(ehci,
"detected XactErr len %zu/%zu retry %d\n",
!urb->unlinked) {
ehci_dbg(ehci,
"detected XactErr len %zu/%zu retry %d\n",
- qtd->length - QTD_LENGTH(token), qtd->length,
- QH_XACTERR_MAX - qh->xacterrs);
+ qtd->length - QTD_LENGTH(token), qtd->length, qh->xacterrs);
/* reset the token in the qtd and the
* qh overlay (which still contains
/* reset the token in the qtd and the
* qh overlay (which still contains
last = qtd;
/* reinit the xacterr counter for the next qtd */
last = qtd;
/* reinit the xacterr counter for the next qtd */
- qh->xacterrs = QH_XACTERR_MAX;
}
/* last urb's completion might still need calling */
}
/* last urb's completion might still need calling */
head->hw_next = dma;
qh_get(qh);
head->hw_next = dma;
qh_get(qh);
- qh->xacterrs = QH_XACTERR_MAX;
qh->qh_state = QH_STATE_LINKED;
/* qtd completions reported later by interrupt */
}
qh->qh_state = QH_STATE_LINKED;
/* qtd completions reported later by interrupt */
}
}
}
qh->qh_state = QH_STATE_LINKED;
}
}
qh->qh_state = QH_STATE_LINKED;
qh_get (qh);
/* update per-qh bandwidth for usbfs */
qh_get (qh);
/* update per-qh bandwidth for usbfs */