[PATCH 0/4] usb: xhci: improve Set TR Deq completion error handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The Set TR Deq command instructs the hardware to skip Transfer Descriptors
(TDs) from A to B. Once the hardware processes the Set TR Deq command,
it returns a completion event indicating either success or an error.

In the event of success, TDs A to B are released, the dequeue pointer is
updated, and if there are still cancelled TDs, a new Set TR Deq command
is issued. Conversely, if an error occurs, a warning is logged, and TDs A
to B are released. This can lead to a mismatch between the driver
and hardware, eventually resulting in an critical error.

When feasible, attempt to resolve errors. Otherwise, retain unresolved
errors as they are and improve the warning message.

xHCI driver issues Set TR Deq commands in 4 places:
xhci_handle_cmd_stop_ep()
  After a successful Stop Endpoint completion event is received.

xhci_handle_cmd_set_deq()
  After receiving a Set TR Deq completion event and there are new
  cancelled TDs.

xhci_handle_cmd_reset_ep()
  After a Endpoint reset completion, Endpoint state is Stopped.

xhci_urb_dequeue()
  If clearing Endpoints Transaction Translator, Endpoint state is Stopped.

Niklas Neronin (4):
  usb: xhci: handle Set TR Deq TRB Error
  usb: xhci: handle Set TR Deq Slot Not Enabled Error
  usb: xhci: handle Set TR Deq Context State Error due to Slot state
  usb: xhci: handle Set TR Deq Context State Error due to Endpoint state

 drivers/usb/host/xhci-ring.c | 68 ++++++++++++++++++++++++++++--------
 1 file changed, 54 insertions(+), 14 deletions(-)

-- 
2.50.1





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux