[PATCH] usb: xhci: Improve tracing of error events

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

 



Even when compiled with USB_DEBUG the diagnostic traces don't contain
any values that help diagnose any errors.

Trace all the fields from error events.

Include the unknown address when the DMA pointer from an event isn't part
of the current TD. This will happen if the error code is "TRB error".

Signed-off-by: David Laight <david.laight@xxxxxxxxxx>
---
 drivers/usb/host/xhci-ring.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index c1342dc..ace586c 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -2520,6 +2520,11 @@ static int handle_data_event(struct xhci_hcd *xhci,
 		goto cleanup;
 	}
 
+	if (status && status != -EINPROGRESS)
+		xhci_dbg(xhci, "event status %d, buffer %llx, len %x, flags %x\n",
+				status, event->buffer, event->transfer_len,
+				event->flags);
+
 	do {
 		/* This TRB should be in the TD at the head of this ring's
 		 * TD list.
@@ -2593,9 +2598,8 @@ static int handle_data_event(struct xhci_hcd *xhci,
 					goto cleanup;
 				}
 				/* HC is busted, give up! */
-				xhci_err(xhci,
-					"ERROR Transfer event TRB DMA ptr not "
-					"part of current TD\n");
+				xhci_err(xhci, "ERROR Transfer event TRB DMA ptr %lld not part of current TD\n",
+						event->buffer);
 				return -ESHUTDOWN;
 			}
 
-- 
1.8.1.2



--
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