If we get a command ring completion, but our command ring dequeue pointer isn't on the command that completed, print a warning. Signed-off-by: Sarah Sharp <sarah.a.sharp@xxxxxxxxxxxxxxx> --- drivers/usb/host/xhci-ring.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index d59eef6..30a4c37 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -1385,6 +1385,13 @@ static void handle_cmd_completion(struct xhci_hcd *xhci, } /* Does the DMA address match our internal dequeue pointer address? */ if (cmd_dma != (u64) cmd_dequeue_dma) { + xhci_dbg(xhci, "Unexpected command completion for %016llx, dequeue at %016llx.\n", + (unsigned long long) cmd_dma, + (unsigned long long) cmd_dequeue_dma); + 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); xhci->error_bitmask |= 1 << 5; return; } -- 1.7.9 -- 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