diff options
author | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2009-04-27 22:58:01 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-16 00:44:49 -0400 |
commit | d0e96f5a71a032ced0c35f521c1cbd67e816922a (patch) | |
tree | 402e4d1ce20682fd2efd3ffd2ad23ffd097b1436 /drivers/usb/host/xhci-mem.c | |
parent | 6d65b78a093552fb42448480d4c66bf093a6d4cf (diff) |
USB: xhci: Control transfer support.
Allow device drivers to enqueue URBs to control endpoints on devices under
an xHCI host controller. Each control transfer is represented by a
series of Transfer Descriptors (TDs) written to an endpoint ring. There
is one TD for the Setup phase, (optionally) one TD for the Data phase, and
one TD for the Status phase.
Enqueue these TDs onto the endpoint ring that represents the control
endpoint. The host controller hardware will return an event on the event
ring that points to the (DMA) address of one of the TDs on the endpoint
ring. If the transfer was successful, the transfer event TRB will have a
completion code of success, and it will point to the Status phase TD.
Anything else is considered an error.
This should work for control endpoints besides the default endpoint, but
that hasn't been tested.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/xhci-mem.c')
-rw-r--r-- | drivers/usb/host/xhci-mem.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index d34b91a135a1..6ff2e298bff8 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
@@ -141,6 +141,7 @@ static struct xhci_ring *xhci_ring_alloc(struct xhci_hcd *xhci, | |||
141 | if (!ring) | 141 | if (!ring) |
142 | return 0; | 142 | return 0; |
143 | 143 | ||
144 | INIT_LIST_HEAD(&ring->td_list); | ||
144 | if (num_segs == 0) | 145 | if (num_segs == 0) |
145 | return ring; | 146 | return ring; |
146 | 147 | ||
@@ -188,6 +189,7 @@ fail: | |||
188 | return 0; | 189 | return 0; |
189 | } | 190 | } |
190 | 191 | ||
192 | /* All the xhci_tds in the ring's TD list should be freed at this point */ | ||
191 | void xhci_free_virt_device(struct xhci_hcd *xhci, int slot_id) | 193 | void xhci_free_virt_device(struct xhci_hcd *xhci, int slot_id) |
192 | { | 194 | { |
193 | struct xhci_virt_device *dev; | 195 | struct xhci_virt_device *dev; |