aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/xhci-ring.c11
-rw-r--r--drivers/usb/host/xhci.h3
2 files changed, 14 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 396f8d2a2e8d..3e759af049b7 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,
3053 field |= TRB_IDT | TRB_TYPE(TRB_SETUP); 3053 field |= TRB_IDT | TRB_TYPE(TRB_SETUP);
3054 if (start_cycle == 0) 3054 if (start_cycle == 0)
3055 field |= 0x1; 3055 field |= 0x1;
3056
3057 /* xHCI 1.0 6.4.1.2.1: Transfer Type field */
3058 if (xhci->hci_version == 0x100) {
3059 if (urb->transfer_buffer_length > 0) {
3060 if (setup->bRequestType & USB_DIR_IN)
3061 field |= TRB_TX_TYPE(TRB_DATA_IN);
3062 else
3063 field |= TRB_TX_TYPE(TRB_DATA_OUT);
3064 }
3065 }
3066
3056 queue_trb(xhci, ep_ring, false, true, 3067 queue_trb(xhci, ep_ring, false, true,
3057 setup->bRequestType | setup->bRequest << 8 | le16_to_cpu(setup->wValue) << 16, 3068 setup->bRequestType | setup->bRequest << 8 | le16_to_cpu(setup->wValue) << 16,
3058 le16_to_cpu(setup->wIndex) | le16_to_cpu(setup->wLength) << 16, 3069 le16_to_cpu(setup->wIndex) | le16_to_cpu(setup->wLength) << 16,
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index db661543a805..af8b66f2fd00 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -967,6 +967,9 @@ struct xhci_event_cmd {
967 967
968/* Control transfer TRB specific fields */ 968/* Control transfer TRB specific fields */
969#define TRB_DIR_IN (1<<16) 969#define TRB_DIR_IN (1<<16)
970#define TRB_TX_TYPE(p) ((p) << 16)
971#define TRB_DATA_OUT 2
972#define TRB_DATA_IN 3
970 973
971/* Isochronous TRB specific fields */ 974/* Isochronous TRB specific fields */
972#define TRB_SIA (1<<31) 975#define TRB_SIA (1<<31)