提交 e2b02177 编写于 作者: M Maarten Lankhorst 提交者: Sarah Sharp

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: NMaarten Lankhorst <m.b.lankhorst@gmail.com>
Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@kernel.org
上级 4819fef5
无相关合并请求
......@@ -438,13 +438,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(le32_to_cpu(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";
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部