Date: Mon, 22 Sep 2014 10:21:43 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271953 - head/sys/dev/usb/controller Message-ID: <201409221021.s8MALhRC091039@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Mon Sep 22 10:21:42 2014 New Revision: 271953 URL: http://svnweb.freebsd.org/changeset/base/271953 Log: 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> Modified: head/sys/dev/usb/controller/xhci.c Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Mon Sep 22 10:21:08 2014 (r271952) +++ head/sys/dev/usb/controller/xhci.c Mon Sep 22 10:21:42 2014 (r271953) @@ -2248,7 +2248,14 @@ xhci_configure_mask(struct usb_device *u 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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409221021.s8MALhRC091039>