staging: octeon-usb: don't retry on data toggle error
authorAaro Koskinen <aaro.koskinen@iki.fi>
Sun, 29 Jun 2014 19:52:54 +0000 (22:52 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Jul 2014 23:39:22 +0000 (16:39 -0700)
On data toggle error, we don't know if and how many bytes were
successfully transferred by DMA. We should just fail the transaction
instead of trying a retry.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/octeon-usb/octeon-hcd.c

index ab237c5..59cf921 100644 (file)
@@ -2840,8 +2840,9 @@ static int __cvmx_usb_poll_channel(struct cvmx_usb_state *usb, int channel)
                __cvmx_usb_perform_complete(usb, pipe, transaction,
                                            CVMX_USB_COMPLETE_BABBLEERR);
        } else if (usbc_hcint.s.datatglerr) {
-               /* We'll retry the exact same transaction again */
-               transaction->retries++;
+               /* Data toggle error */
+               __cvmx_usb_perform_complete(usb, pipe, transaction,
+                                           CVMX_USB_COMPLETE_DATATGLERR);
        } else if (usbc_hcint.s.nyet) {
                /*
                 * NYET as a response is only allowed in three cases: as a