aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-ring.c
diff options
context:
space:
mode:
authorAndiry Xu <andiry.xu@amd.com>2011-05-05 18:13:56 +0800
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2011-05-09 09:34:46 -0700
commitb83cdc8f4d94a127e9319bef37f384b01ecca72e (patch)
treedffaaf7b188401220f45d2c7070d422a3ea21b08 /drivers/usb/host/xhci-ring.c
parent04aebcbb1b6dccadc8862b2765265f65a946db57 (diff)
downloadkernel_samsung_smdk4412-b83cdc8f4d94a127e9319bef37f384b01ecca72e.zip
kernel_samsung_smdk4412-b83cdc8f4d94a127e9319bef37f384b01ecca72e.tar.gz
kernel_samsung_smdk4412-b83cdc8f4d94a127e9319bef37f384b01ecca72e.tar.bz2
xHCI 1.0: Setup Stage TRB Transfer Type flag
Setup Stage Transfer Type field is added to indicate the presence and the direction of the Data Stage TD, and determines the direction of the Status Stage TD so the wLength length field should be ignored by the xHC. Signed-off-by: Andiry Xu <andiry.xu@amd.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb/host/xhci-ring.c')
-rw-r--r--drivers/usb/host/xhci-ring.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 396f8d2..3e759af 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -3053,6 +3053,17 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
field |= TRB_IDT | TRB_TYPE(TRB_SETUP);
if (start_cycle == 0)
field |= 0x1;
+
+ /* xHCI 1.0 6.4.1.2.1: Transfer Type field */
+ if (xhci->hci_version == 0x100) {
+ if (urb->transfer_buffer_length > 0) {
+ if (setup->bRequestType & USB_DIR_IN)
+ field |= TRB_TX_TYPE(TRB_DATA_IN);
+ else
+ field |= TRB_TX_TYPE(TRB_DATA_OUT);
+ }
+ }
+
queue_trb(xhci, ep_ring, false, true,
setup->bRequestType | setup->bRequest << 8 | le16_to_cpu(setup->wValue) << 16,
le16_to_cpu(setup->wIndex) | le16_to_cpu(setup->wLength) << 16,