[RFC 5/5 v2] xHCI: Add debug message in handle_tx_event()

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

 



If we receive a transfer event but cannot find the corresponding TRB in
the currently executing TD and there is no Missed Service Event, it means
something bad happens. Print out event ring and ep ring in this case.

Signed-off-by: Andiry Xu <andiry.xu@xxxxxxx>
---
 drivers/usb/host/xhci-ring.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 91ca32b..edf1804 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -2195,6 +2195,10 @@ static int handle_tx_event(struct xhci_hcd *xhci,
 				xhci_err(xhci,
 					"ERROR Transfer event TRB DMA ptr not "
 					"part of current TD\n");
+				xhci_warn(xhci, "Event Ring:\n");
+				xhci_debug_ring(xhci, xhci->event_ring, 1);
+				xhci_warn(xhci, "EP Ring:\n");
+				xhci_debug_ring(xhci, ep_ring, 1);
 				return -ESHUTDOWN;
 			}
 
-- 
1.7.4.1


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux