aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/octeon-usb
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@iki.fi>2015-03-22 17:37:52 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-24 13:47:11 +0100
commit532edc93e23e656094ede793c92207a2c237740e (patch)
tree168a3cb39a8af06207208a61abff7819517f1bc0 /drivers/staging/octeon-usb
parentstaging: octeon-usb: program DMA engine based on transfer direction (diff)
downloadlinux-dev-532edc93e23e656094ede793c92207a2c237740e.tar.xz
linux-dev-532edc93e23e656094ede793c92207a2c237740e.zip
staging: octeon-usb: never retry after xacterr
Never retry after xacterr. The DMA engine cannot handle that properly and may result in wrong transfer count and hang. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/octeon-usb')
-rw-r--r--drivers/staging/octeon-usb/octeon-hcd.c38
1 files changed, 5 insertions, 33 deletions
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
index a8c467ff4204..40e22e4bc75a 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -2685,40 +2685,12 @@ static int cvmx_usb_poll_channel(struct cvmx_usb_state *usb, int channel)
CVMX_USB_COMPLETE_STALL);
} else if (usbc_hcint.s.xacterr) {
/*
- * We know at least one packet worked if we get a ACK or NAK.
- * Reset the retry counter
+ * XactErr as a response means the device signaled
+ * something wrong with the transfer. For example, PID
+ * toggle errors cause these.
*/
- if (usbc_hcint.s.nak || usbc_hcint.s.ack)
- transaction->retries = 0;
- transaction->retries++;
- if (transaction->retries > MAX_RETRIES) {
- /*
- * XactErr as a response means the device signaled
- * something wrong with the transfer. For example, PID
- * toggle errors cause these
- */
- cvmx_usb_perform_complete(usb, pipe, transaction,
- CVMX_USB_COMPLETE_XACTERR);
- } else {
- /*
- * If this was a split then clear our split in progress
- * marker
- */
- if (usb->active_split == transaction)
- usb->active_split = NULL;
- /*
- * Rewind to the beginning of the transaction by anding
- * off the split complete bit
- */
- transaction->stage &= ~1;
- pipe->split_sc_frame = -1;
- pipe->next_tx_frame += pipe->interval;
- if (pipe->next_tx_frame < usb->frame_number)
- pipe->next_tx_frame =
- usb->frame_number + pipe->interval -
- (usb->frame_number -
- pipe->next_tx_frame) % pipe->interval;
- }
+ cvmx_usb_perform_complete(usb, pipe, transaction,
+ CVMX_USB_COMPLETE_XACTERR);
} else if (usbc_hcint.s.bblerr) {
/* Babble Error (BblErr) */
cvmx_usb_perform_complete(usb, pipe, transaction,