diff options
author | hselasky <hselasky@FreeBSD.org> | 2015-01-11 11:28:03 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2015-01-11 11:28:03 +0000 |
commit | 0ee44a5ce1304c67302454dfe09ef64f09f56d8a (patch) | |
tree | f91da145dfb4f16580df4919e7673a37243fcaff /sys/dev/usb/controller/xhci.c | |
parent | 0669b1a982aaa4f366dd7ade4d4c7a87015d543f (diff) | |
download | FreeBSD-src-0ee44a5ce1304c67302454dfe09ef64f09f56d8a.zip FreeBSD-src-0ee44a5ce1304c67302454dfe09ef64f09f56d8a.tar.gz |
MFC r276321, r276404, r276407 and r276799:
Various XHCI fixes and improvements:
- Improve and fix MSI interrupt allocation, setup and release.
- Add missed flushing of data which can happen when "xhci_configure_mask()"
is called from "xhci_configure_reset_endpoint()". Ensure the 3-strikes
error feature is always enabled except for ISOCHRONOUS transfers.
- Allow systems having a page size greater than 4K to use fewer
scatter-gather XHCI TRB entries for its payload data. The XHCI
controller can handle at least 65536 bytes per scatter-gather list
entry.
Diffstat (limited to 'sys/dev/usb/controller/xhci.c')
-rw-r--r-- | sys/dev/usb/controller/xhci.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/usb/controller/xhci.c b/sys/dev/usb/controller/xhci.c index 82c52fd..9845f2c 100644 --- a/sys/dev/usb/controller/xhci.c +++ b/sys/dev/usb/controller/xhci.c @@ -2287,6 +2287,7 @@ xhci_configure_mask(struct usb_device *udev, uint32_t mask, uint8_t drop) temp |= XHCI_SCTX_0_CTX_NUM_SET(x + 1); xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx0, temp); } + usb_pc_cpu_flush(&sc->sc_hw.devs[index].input_pc); return (0); } @@ -2391,10 +2392,14 @@ xhci_configure_endpoint(struct usb_device *udev, XHCI_EPCTX_1_MAXB_SET(max_packet_count) | XHCI_EPCTX_1_MAXP_SIZE_SET(max_packet_size); - if ((udev->parent_hs_hub != NULL) || (udev->address != 0)) { - if (type != UE_ISOCHRONOUS) - temp |= XHCI_EPCTX_1_CERR_SET(3); - } + /* + * Always enable the "three strikes and you are gone" feature + * except for ISOCHRONOUS endpoints. This is suggested by + * section 4.3.3 in the XHCI specification about device slot + * initialisation. + */ + if (type != UE_ISOCHRONOUS) + temp |= XHCI_EPCTX_1_CERR_SET(3); switch (type) { case UE_CONTROL: |