diff options
author | Andiry Xu <andiry.xu@amd.com> | 2012-03-05 04:49:32 -0500 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2012-03-12 19:50:24 -0400 |
commit | 3b72fca09d7aed0c1a390370eb3f3f4f0480702a (patch) | |
tree | 3e1de71e220ed585fd85b1b2002652c96c760b04 /drivers/usb/host/xhci.h | |
parent | 8d3709f3dd41769338cc383bec23673fd1ce34e7 (diff) |
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.h | 11 |
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 { | |||
1250 | int new_cycle_state; | 1250 | int new_cycle_state; |
1251 | }; | 1251 | }; |
1252 | 1252 | ||
1253 | enum xhci_ring_type { | ||
1254 | TYPE_CTRL = 0, | ||
1255 | TYPE_ISOC, | ||
1256 | TYPE_BULK, | ||
1257 | TYPE_INTR, | ||
1258 | TYPE_STREAM, | ||
1259 | TYPE_COMMAND, | ||
1260 | TYPE_EVENT, | ||
1261 | }; | ||
1262 | |||
1253 | struct xhci_ring { | 1263 | struct xhci_ring { |
1254 | struct xhci_segment *first_seg; | 1264 | struct xhci_segment *first_seg; |
1255 | union xhci_trb *enqueue; | 1265 | union xhci_trb *enqueue; |
@@ -1266,6 +1276,7 @@ struct xhci_ring { | |||
1266 | */ | 1276 | */ |
1267 | u32 cycle_state; | 1277 | u32 cycle_state; |
1268 | unsigned int stream_id; | 1278 | unsigned int stream_id; |
1279 | enum xhci_ring_type type; | ||
1269 | bool last_td_was_short; | 1280 | bool last_td_was_short; |
1270 | }; | 1281 | }; |
1271 | 1282 | ||