summaryrefslogtreecommitdiff
path: root/drivers/usb/host/xhci.h
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2016-11-11 15:13:28 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-14 10:18:22 +0100
commit5071e6b279178f7d25e1aebd23f49f686657a5fb (patch)
tree52da956ffaf401fb9877f32c9e050e7e7002916b /drivers/usb/host/xhci.h
parent3f1dae6b19c9b4ba51ad016e30ec17399819bb6d (diff)
downloadlinux-next-5071e6b279178f7d25e1aebd23f49f686657a5fb.tar.gz
xhci: add helper to get the endpoint state of a endpoint context
define GET_EP_CTX_STATE() macro to get the endpoint state from a pointer to a le32 enpoint context structure No functional changes Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci.h')
-rw-r--r--drivers/usb/host/xhci.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 0751c6ad52e6..ad1a25b7b9be 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -709,6 +709,8 @@ struct xhci_ep_ctx {
#define EP_STATE_HALTED 2
#define EP_STATE_STOPPED 3
#define EP_STATE_ERROR 4
+#define GET_EP_CTX_STATE(ctx) (le32_to_cpu((ctx)->ep_info) & EP_STATE_MASK)
+
/* Mult - Max number of burtst within an interval, in EP companion desc. */
#define EP_MULT(p) (((p) & 0x3) << 8)
#define CTX_TO_EP_MULT(p) (((p) >> 8) & 0x3)