mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-16 09:34:22 +08:00
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>
This commit is contained in:
parent
d712648a22
commit
532edc93e2
@ -2684,41 +2684,13 @@ static int cvmx_usb_poll_channel(struct cvmx_usb_state *usb, int channel)
|
|||||||
cvmx_usb_perform_complete(usb, pipe, transaction,
|
cvmx_usb_perform_complete(usb, pipe, transaction,
|
||||||
CVMX_USB_COMPLETE_STALL);
|
CVMX_USB_COMPLETE_STALL);
|
||||||
} else if (usbc_hcint.s.xacterr) {
|
} else if (usbc_hcint.s.xacterr) {
|
||||||
/*
|
|
||||||
* We know at least one packet worked if we get a ACK or NAK.
|
|
||||||
* Reset the retry counter
|
|
||||||
*/
|
|
||||||
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
|
* XactErr as a response means the device signaled
|
||||||
* something wrong with the transfer. For example, PID
|
* something wrong with the transfer. For example, PID
|
||||||
* toggle errors cause these
|
* toggle errors cause these.
|
||||||
*/
|
*/
|
||||||
cvmx_usb_perform_complete(usb, pipe, transaction,
|
cvmx_usb_perform_complete(usb, pipe, transaction,
|
||||||
CVMX_USB_COMPLETE_XACTERR);
|
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;
|
|
||||||
}
|
|
||||||
} else if (usbc_hcint.s.bblerr) {
|
} else if (usbc_hcint.s.bblerr) {
|
||||||
/* Babble Error (BblErr) */
|
/* Babble Error (BblErr) */
|
||||||
cvmx_usb_perform_complete(usb, pipe, transaction,
|
cvmx_usb_perform_complete(usb, pipe, transaction,
|
||||||
|
Loading…
Reference in New Issue
Block a user