diff options
author | hselasky <hselasky@FreeBSD.org> | 2015-02-10 13:16:53 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2015-02-10 13:16:53 +0000 |
commit | 811636d3640fe5b1590b9441ea57b2df6f839115 (patch) | |
tree | 4230e333fd353b97f284efc28a694ed35bf28269 /sys/dev/usb/controller | |
parent | f35a53399fc49c336886f35bbd0df9204d9ef884 (diff) | |
download | FreeBSD-src-811636d3640fe5b1590b9441ea57b2df6f839115.zip FreeBSD-src-811636d3640fe5b1590b9441ea57b2df6f839115.tar.gz |
MFC r278071:
Section 3.2.9 in the XHCI specification about control transfers says
that we should use a normal-TRB if there are more TRBs extending the
data-stage TRB. Add a dedicated state bit to the internal USB transfer
flags to handle this case.
Diffstat (limited to 'sys/dev/usb/controller')
-rw-r--r-- | sys/dev/usb/controller/xhci.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/dev/usb/controller/xhci.c b/sys/dev/usb/controller/xhci.c index 66e6957..da7f7f6 100644 --- a/sys/dev/usb/controller/xhci.c +++ b/sys/dev/usb/controller/xhci.c @@ -1870,6 +1870,15 @@ restart: XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_DATA_STAGE); if (temp->direction == UE_DIR_IN) dword |= XHCI_TRB_3_DIR_IN | XHCI_TRB_3_ISP_BIT; + /* + * Section 3.2.9 in the XHCI + * specification about control + * transfers says that we should use a + * normal-TRB if there are more TRBs + * extending the data-stage + * TRB. Update the "trb_type". + */ + temp->trb_type = XHCI_TRB_TYPE_NORMAL; break; case XHCI_TRB_TYPE_STATUS_STAGE: dword = XHCI_TRB_3_CHAIN_BIT | XHCI_TRB_3_CYCLE_BIT | @@ -2110,7 +2119,8 @@ xhci_setup_generic_chain(struct usb_xfer *xfer) mult = 1; temp.isoc_delta = 0; temp.isoc_frame = 0; - temp.trb_type = XHCI_TRB_TYPE_DATA_STAGE; + temp.trb_type = xfer->flags_int.control_did_data ? + XHCI_TRB_TYPE_NORMAL : XHCI_TRB_TYPE_DATA_STAGE; } else { x = 0; mult = 1; |