summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.h
diff options
context:
space:
mode:
authorAndiry Xu <andiry.xu@amd.com>2012-03-05 17:49:32 +0800
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2012-03-12 16:50:24 -0700
commit3b72fca09d7aed0c1a390370eb3f3f4f0480702a (patch)
tree3e1de71e220ed585fd85b1b2002652c96c760b04 /drivers/usb/host/xhci.h
parent8d3709f3dd41769338cc383bec23673fd1ce34e7 (diff)
downloadlinux-3b72fca09d7aed0c1a390370eb3f3f4f0480702a.tar.bz2
xHCI: store ring's type
When allocate a ring, store its type - four transfer types for endpoint, TYPE_STREAM for stream transfer, and TYPE_COMMAND/TYPE_EVENT for xHCI host. This helps to get rid of three bool function parameters: link_trbs, isoc and consumer. Signed-off-by: Andiry Xu <andiry.xu@amd.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Tested-by: Paul Zimmerman <Paul.Zimmerman@synopsys.com>
Diffstat (limited to 'drivers/usb/host/xhci.h')
-rw-r--r--drivers/usb/host/xhci.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 9a7138c29030..eb369a1723b1 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1250,6 +1250,16 @@ struct xhci_dequeue_state {
int new_cycle_state;
};
+enum xhci_ring_type {
+ TYPE_CTRL = 0,
+ TYPE_ISOC,
+ TYPE_BULK,
+ TYPE_INTR,
+ TYPE_STREAM,
+ TYPE_COMMAND,
+ TYPE_EVENT,
+};
+
struct xhci_ring {
struct xhci_segment *first_seg;
union xhci_trb *enqueue;
@@ -1266,6 +1276,7 @@ struct xhci_ring {
*/
u32 cycle_state;
unsigned int stream_id;
+ enum xhci_ring_type type;
bool last_td_was_short;
};