diff options
author | Maarten Lankhorst <m.b.lankhorst@gmail.com> | 2011-06-01 17:27:49 -0400 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2011-06-02 19:38:24 -0400 |
commit | e2b0217715c6d10379d94bdfe5560af96eecbb7c (patch) | |
tree | 58876a9dae4a1b1c506c793488f58366d17d7e9b | |
parent | 4819fef5e7cb9a39e1fd59ecd85861b3ffebdcaa (diff) |
xhci: Add defines for hardcoded slot states
This needs to be added to the stable trees back to 2.6.34 to support an
upcoming bug fix.
Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@kernel.org
-rw-r--r-- | drivers/usb/host/xhci-dbg.c | 8 | ||||
-rw-r--r-- | drivers/usb/host/xhci.h | 5 |
2 files changed, 9 insertions, 4 deletions
diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c index 2e0486178dbe..1f50b4468e87 100644 --- a/drivers/usb/host/xhci-dbg.c +++ b/drivers/usb/host/xhci-dbg.c | |||
@@ -438,13 +438,13 @@ char *xhci_get_slot_state(struct xhci_hcd *xhci, | |||
438 | struct xhci_slot_ctx *slot_ctx = xhci_get_slot_ctx(xhci, ctx); | 438 | struct xhci_slot_ctx *slot_ctx = xhci_get_slot_ctx(xhci, ctx); |
439 | 439 | ||
440 | switch (GET_SLOT_STATE(le32_to_cpu(slot_ctx->dev_state))) { | 440 | switch (GET_SLOT_STATE(le32_to_cpu(slot_ctx->dev_state))) { |
441 | case 0: | 441 | case SLOT_STATE_ENABLED: |
442 | return "enabled/disabled"; | 442 | return "enabled/disabled"; |
443 | case 1: | 443 | case SLOT_STATE_DEFAULT: |
444 | return "default"; | 444 | return "default"; |
445 | case 2: | 445 | case SLOT_STATE_ADDRESSED: |
446 | return "addressed"; | 446 | return "addressed"; |
447 | case 3: | 447 | case SLOT_STATE_CONFIGURED: |
448 | return "configured"; | 448 | return "configured"; |
449 | default: | 449 | default: |
450 | return "reserved"; | 450 | return "reserved"; |
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index ac0196e7fcf1..bbc1d9afb49c 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h | |||
@@ -560,6 +560,11 @@ struct xhci_slot_ctx { | |||
560 | #define SLOT_STATE (0x1f << 27) | 560 | #define SLOT_STATE (0x1f << 27) |
561 | #define GET_SLOT_STATE(p) (((p) & (0x1f << 27)) >> 27) | 561 | #define GET_SLOT_STATE(p) (((p) & (0x1f << 27)) >> 27) |
562 | 562 | ||
563 | #define SLOT_STATE_DISABLED 0 | ||
564 | #define SLOT_STATE_ENABLED SLOT_STATE_DISABLED | ||
565 | #define SLOT_STATE_DEFAULT 1 | ||
566 | #define SLOT_STATE_ADDRESSED 2 | ||
567 | #define SLOT_STATE_CONFIGURED 3 | ||
563 | 568 | ||
564 | /** | 569 | /** |
565 | * struct xhci_ep_ctx | 570 | * struct xhci_ep_ctx |