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); return GET_SLOT_STATE(slot_ctx->dev_state); #if 0 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"; } #endif }
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(le32_to_cpu(slot_ctx->dev_state))) { case SLOT_STATE_ENABLED: return "enabled/disabled"; case SLOT_STATE_DEFAULT: return "default"; case SLOT_STATE_ADDRESSED: return "addressed"; case SLOT_STATE_CONFIGURED: return "configured"; default: return "reserved"; } }