On 02/22/2012 08:25 AM, Sarah Sharp wrote: > On Fri, Dec 23, 2011 at 05:41:20PM +0800, Andiry Xu wrote: >> Normally command ring should not be full. If it's full, something weird >> happens. Print out the command ring and event 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 eef8370..adacacf 100644 >> --- a/drivers/usb/host/xhci-ring.c >> +++ b/drivers/usb/host/xhci-ring.c >> @@ -3452,6 +3452,10 @@ static int queue_command(struct xhci_hcd *xhci, u32 field1, u32 field2, >> reserved_trbs, false, GFP_ATOMIC); >> if (ret < 0) { >> xhci_err(xhci, "ERR: No room for command on command ring\n"); >> + xhci_dbg(xhci, "Command Ring:\n"); >> + xhci_debug_ring(xhci, xhci->cmd_ring); >> + xhci_dbg(xhci, "Event Ring:\n"); >> + xhci_debug_ring(xhci, xhci->event_ring); > > Can you add a new function, similar to xhci_debug_ring, that uses > xhci_warn instead of xhci_dbg to print the ring? It would be very > useful to print the ring on a hard error like this without making the > user recompile their kernel. > Sure, will do. Thanks, Andiry > Meh, the xHCI debugging should just use the event tracer infrastructure, > so people can turn specific debugging on and off, but that's a lot more > work in the long run. > > Sarah Sharp > -- > 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 > -- 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