USB: xHCI: Fixed abort_td failure for usb start command

With specific USB storage device, usb start command causing
system reboot. This change avoids queuing any new URB on a
halted endpoint.

The failure log is given below:

------------------------ ERROR MESSAGE ---------------------------
scanning bus 1 for devices...
WARN halted endpoint, queueing URB anyway.
Unexpected XHCI event TRB, skipping... (87244c70 00000000 13000000 01008401)
BUG: failure at drivers/usb/host/xhci-ring.c:489/abort_td()!
BUG!
------------------------------------------------------------------

Change-Id: I0735b89832416ebd4b8d80129572afec4bb950a4
Signed-off-by: Pradeep Das <pkdas@codeaurora.org>
This commit is contained in:
Pradeep Das 2018-03-02 10:03:19 +05:30 committed by Gerrit - the friendly Code Review server
parent 480c11c94d
commit 02f249949e

View file

@ -225,7 +225,8 @@ static int prepare_ring(struct xhci_ctrl *ctrl, struct xhci_ring *ep_ring,
puts("WARN waiting for error on ep to be cleared\n");
return -EINVAL;
case EP_STATE_HALTED:
puts("WARN halted endpoint, queueing URB anyway.\n");
puts("WARN halted endpoint\n");
return -EPIPE;
case EP_STATE_STOPPED:
case EP_STATE_RUNNING:
debug("EP STATE RUNNING.\n");