linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bernhard Gebetsberger <bernhard.gebetsberger@gmx.at>
To: unlisted-recipients:; (no To-header on input)
Cc: Bernhard Gebetsberger <bernhard.gebetsberger@gmx.at>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org (open list:USB XHCI DRIVER),
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] xhci: Don't use soft retry if slot id > 0
Date: Sun, 13 Oct 2019 02:33:13 +0200	[thread overview]
Message-ID: <20191013003313.3497-1-bernhard.gebetsberger@gmx.at> (raw)

According to the xhci specification(chapter 4.6.8.1) soft retry
shouldn't be used if the slot id is higher than 0. Currently some usb
devices break on some systems because soft retry is being used when
there is a transaction error, without checking the slot id.

Fixes: f8f80be501aa ("xhci: Use soft retry to recover faster from
transaction errors")

Signed-off-by: Bernhard Gebetsberger <bernhard.gebetsberger@gmx.at>
---
 drivers/usb/host/xhci-ring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 85ceb43e3405..5fa06189068d 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -2270,7 +2270,7 @@ static int process_bulk_intr_td(struct xhci_hcd *xhci, struct xhci_td *td,
 		break;
 	case COMP_USB_TRANSACTION_ERROR:
 		if ((ep_ring->err_count++ > MAX_SOFT_RETRY) ||
-		    le32_to_cpu(slot_ctx->tt_info) & TT_SLOT)
+		    le32_to_cpu(slot_ctx->tt_info) & TT_SLOT || slot_id > 0)
 			break;
 		*status = 0;
 		xhci_cleanup_halted_endpoint(xhci, slot_id, ep_index,
--
2.23.0


             reply	other threads:[~2019-10-13  0:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-13  0:33 Bernhard Gebetsberger [this message]
2019-10-14  8:06 ` [PATCH] xhci: Don't use soft retry if slot id > 0 Mathias Nyman
2019-10-14  9:17   ` Bernhard Gebetsberger

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=20191013003313.3497-1-bernhard.gebetsberger@gmx.at \
    --to=bernhard.gebetsberger@gmx.at \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).