]> rtime.felk.cvut.cz Git - linux-imx.git/blobdiff - drivers/usb/host/xhci-dbg.c
USB: xhci: Notify the xHC when a device is reset.
[linux-imx.git] / drivers / usb / host / xhci-dbg.c
index 33128d52f21285ae04272e56659b6f800ea4bebd..b2915aea47ee033fa7a6ee188d140ffe032ac216 100644 (file)
@@ -406,6 +406,25 @@ static void dbg_rsvd64(struct xhci_hcd *xhci, u64 *ctx, dma_addr_t dma)
        }
 }
 
+inline char *xhci_get_slot_state(struct xhci_hcd *xhci,
+               struct xhci_container_ctx *ctx)
+{
+       struct xhci_slot_ctx *slot_ctx = xhci_get_slot_ctx(xhci, ctx);
+
+       switch (GET_SLOT_STATE(slot_ctx->dev_state)) {
+       case 0:
+               return "enabled/disabled";
+       case 1:
+               return "default";
+       case 2:
+               return "addressed";
+       case 3:
+               return "configured";
+       default:
+               return "reserved";
+       }
+}
+
 void xhci_dbg_slot_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx)
 {
        /* Fields are 32 bits wide, DMA addresses are in bytes */