From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: <gregkh@linuxfoundation.org>
Cc: <linux-usb@vger.kernel.org>,
Mathias Nyman <mathias.nyman@linux.intel.com>,
<stable@vger.kernel.org>
Subject: [PATCH v2 8/9] xhci: change xhci 1.0 only restrictions to support xhci 1.1
Date: Mon, 21 Sep 2015 17:46:16 +0300 [thread overview]
Message-ID: <1442846777-18389-9-git-send-email-mathias.nyman@linux.intel.com> (raw)
In-Reply-To: <1442846777-18389-1-git-send-email-mathias.nyman@linux.intel.com>
Some changes between xhci 0.96 and xhci 1.0 specifications forced us to
check the hci version in code, some of these checks were implemented as
hci_version == 1.0, which will not work with new xhci 1.1 controllers.
xhci 1.1 behaves similar to xhci 1.0 in these cases, so change these
checks to hci_version >= 1.0
Cc: <stable@vger.kernel.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
---
drivers/usb/host/xhci-mem.c | 6 +++---
drivers/usb/host/xhci-ring.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 9a8c936..8497fb8 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -1498,10 +1498,10 @@ int xhci_endpoint_init(struct xhci_hcd *xhci,
* use Event Data TRBs, and we don't chain in a link TRB on short
* transfers, we're basically dividing by 1.
*
- * xHCI 1.0 specification indicates that the Average TRB Length should
- * be set to 8 for control endpoints.
+ * xHCI 1.0 and 1.1 specification indicates that the Average TRB Length
+ * should be set to 8 for control endpoints.
*/
- if (usb_endpoint_xfer_control(&ep->desc) && xhci->hci_version == 0x100)
+ if (usb_endpoint_xfer_control(&ep->desc) && xhci->hci_version >= 0x100)
ep_ctx->tx_info |= cpu_to_le32(AVG_TRB_LENGTH_FOR_EP(8));
else
ep_ctx->tx_info |=
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 1c61e5e..43291f9 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -3470,8 +3470,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
if (start_cycle == 0)
field |= 0x1;
- /* xHCI 1.0 6.4.1.2.1: Transfer Type field */
- if (xhci->hci_version == 0x100) {
+ /* xHCI 1.0/1.1 6.4.1.2.1: Transfer Type field */
+ if (xhci->hci_version >= 0x100) {
if (urb->transfer_buffer_length > 0) {
if (setup->bRequestType & USB_DIR_IN)
field |= TRB_TX_TYPE(TRB_DATA_IN);
--
1.9.1
next prev parent reply other threads:[~2015-09-21 14:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1442846777-18389-1-git-send-email-mathias.nyman@linux.intel.com>
2015-09-21 14:46 ` [PATCH v2 1/9] usb: Use the USB_SS_MULT() macro to get the burst multiplier Mathias Nyman
2015-09-21 18:47 ` Sergei Shtylyov
2015-09-21 14:46 ` [PATCH v2 2/9] xhci: give command abortion one more chance before killing xhci Mathias Nyman
2015-09-21 14:46 ` [PATCH v2 3/9] xhci: Move xhci_pme_quirk() behind #ifdef CONFIG_PM Mathias Nyman
2015-09-21 14:46 ` [PATCH v2 4/9] usb: xhci: lock mutex on xhci_stop Mathias Nyman
2015-09-21 14:46 ` [PATCH v2 5/9] usb: xhci: Clear XHCI_STATE_DYING on start Mathias Nyman
2015-09-21 14:46 ` [PATCH v2 6/9] usb: xhci: stop everything on the first call to xhci_stop Mathias Nyman
2015-09-21 14:46 ` [PATCH v2 7/9] usb: xhci: exit early in xhci_setup_device() if we're halted or dying Mathias Nyman
2015-09-21 14:46 ` Mathias Nyman [this message]
2015-09-21 14:46 ` [PATCH v2 9/9] xhci: init command timeout timer earlier to avoid deleting it uninitialized Mathias Nyman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1442846777-18389-9-git-send-email-mathias.nyman@linux.intel.com \
--to=mathias.nyman@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.