diff options
author | hselasky <hselasky@FreeBSD.org> | 2014-09-22 10:21:42 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2014-09-22 10:21:42 +0000 |
commit | 2b799f4318e1953e1a387fecfa820d5b253dc6ec (patch) | |
tree | d4e9587993c708b3be84430a3357acf1e07dff8d /sys/dev/usb/controller/xhci.c | |
parent | 3832b4fbc3f7a0166cb453409d588008c1f05163 (diff) | |
download | FreeBSD-src-2b799f4318e1953e1a387fecfa820d5b253dc6ec.zip FreeBSD-src-2b799f4318e1953e1a387fecfa820d5b253dc6ec.tar.gz |
Some XHCI hardware requires dropping the endpoint context before
adding it again.
MFC after: 3 days
Submitted by: Kohji Okuno <okuno.kohji@jp.panasonic.com>
Diffstat (limited to 'sys/dev/usb/controller/xhci.c')
-rw-r--r-- | sys/dev/usb/controller/xhci.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/usb/controller/xhci.c b/sys/dev/usb/controller/xhci.c index 5e9029c..f06964e 100644 --- a/sys/dev/usb/controller/xhci.c +++ b/sys/dev/usb/controller/xhci.c @@ -2248,7 +2248,14 @@ xhci_configure_mask(struct usb_device *udev, uint32_t mask, uint8_t drop) xhci_ctx_set_le32(sc, &pinp->ctx_input.dwInCtx0, mask); xhci_ctx_set_le32(sc, &pinp->ctx_input.dwInCtx1, 0); } else { - xhci_ctx_set_le32(sc, &pinp->ctx_input.dwInCtx0, 0); + /* + * Some hardware requires that we drop the endpoint + * context before adding it again: + */ + xhci_ctx_set_le32(sc, &pinp->ctx_input.dwInCtx0, + mask & XHCI_INCTX_NON_CTRL_MASK); + + /* Add new endpoint context */ xhci_ctx_set_le32(sc, &pinp->ctx_input.dwInCtx1, mask); /* find most significant set bit */ |