]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
xhci: Add defines for hardcoded slot states
authorMaarten Lankhorst <m.b.lankhorst@gmail.com>
Wed, 1 Jun 2011 21:27:49 +0000 (23:27 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 23 Jun 2011 22:05:38 +0000 (15:05 -0700)
commit e2b0217715c6d10379d94bdfe5560af96eecbb7c upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/xhci-dbg.c
drivers/usb/host/xhci.h

index 0231814a97a50ab9407cb9af25a06ca1e1f36a55..ff00bd8a8b061f7af93a07e81d666ca871470a5c 100644 (file)
@@ -437,13 +437,13 @@ char *xhci_get_slot_state(struct xhci_hcd *xhci,
        struct xhci_slot_ctx *slot_ctx = xhci_get_slot_ctx(xhci, ctx);
 
        switch (GET_SLOT_STATE(slot_ctx->dev_state)) {
-       case 0:
+       case SLOT_STATE_ENABLED:
                return "enabled/disabled";
-       case 1:
+       case SLOT_STATE_DEFAULT:
                return "default";
-       case 2:
+       case SLOT_STATE_ADDRESSED:
                return "addressed";
-       case 3:
+       case SLOT_STATE_CONFIGURED:
                return "configured";
        default:
                return "reserved";
index ba1be6b7cc6d91774323e9dd0848e759fe338c9f..507a50f72e5efe51330f5c30e9ae41ff40176e10 100644 (file)
@@ -560,6 +560,11 @@ struct xhci_slot_ctx {
 #define SLOT_STATE     (0x1f << 27)
 #define GET_SLOT_STATE(p)      (((p) & (0x1f << 27)) >> 27)
 
+#define SLOT_STATE_DISABLED    0
+#define SLOT_STATE_ENABLED     SLOT_STATE_DISABLED
+#define SLOT_STATE_DEFAULT     1
+#define SLOT_STATE_ADDRESSED   2
+#define SLOT_STATE_CONFIGURED  3
 
 /**
  * struct xhci_ep_ctx