All of lore.kernel.org
 help / color / mirror / Atom feed
From: Niklas Neronin <niklas.neronin@linux.intel.com>
To: mathias.nyman@linux.intel.com
Cc: linux-usb@vger.kernel.org,
	Niklas Neronin <niklas.neronin@linux.intel.com>
Subject: [PATCH 2/8] usb: xhci: move link TRB quirk to xhci_gen_setup()
Date: Thu, 17 Oct 2024 16:05:02 +0300	[thread overview]
Message-ID: <20241017130508.1293021-3-niklas.neronin@linux.intel.com> (raw)
In-Reply-To: <20241017130508.1293021-1-niklas.neronin@linux.intel.com>

This quirk is old and seldom seen, as a result the trace is changed
to debug message and only printed when the quirk is set.

Move it into xhci_gen_setup() where the majority of quirks are set.

Signed-off-by: Niklas Neronin <niklas.neronin@linux.intel.com>
---
 drivers/usb/host/xhci.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 4edd850e6328..62c2fd301456 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -473,14 +473,7 @@ static int xhci_init(struct usb_hcd *hcd)
 
 	xhci_dbg_trace(xhci, trace_xhci_dbg_init, "xhci_init");
 	spin_lock_init(&xhci->lock);
-	if (xhci->hci_version == 0x95 && link_quirk) {
-		xhci_dbg_trace(xhci, trace_xhci_dbg_quirks,
-				"QUIRK: Not clearing Link TRB chain bits.");
-		xhci->quirks |= XHCI_LINK_TRB_QUIRK;
-	} else {
-		xhci_dbg_trace(xhci, trace_xhci_dbg_init,
-				"xHCI doesn't need link TRB QUIRK");
-	}
+
 	retval = xhci_mem_init(xhci, GFP_KERNEL);
 	xhci_dbg_trace(xhci, trace_xhci_dbg_init, "Finished xhci_init");
 
@@ -5247,6 +5240,11 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
 	if (xhci->hci_version > 0x96)
 		xhci->quirks |= XHCI_SPURIOUS_SUCCESS;
 
+	if (xhci->hci_version == 0x95 && link_quirk) {
+		xhci_dbg(xhci, "QUIRK: Not clearing Link TRB chain bits");
+		xhci->quirks |= XHCI_LINK_TRB_QUIRK;
+	}
+
 	/* Make sure the HC is halted. */
 	retval = xhci_halt(xhci);
 	if (retval)
-- 
2.45.2


  parent reply	other threads:[~2024-10-17 13:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-17 13:05 [PATCH 0/8] usb: xhci: various xhci cleanups and improvements Niklas Neronin
2024-10-17 13:05 ` [PATCH 1/8] usb: xhci: simplify TDs start and end naming scheme in struct 'xhci_td' Niklas Neronin
2024-10-17 21:59   ` Michał Pecio
2024-10-17 13:05 ` Niklas Neronin [this message]
2024-10-17 13:05 ` [PATCH 3/8] usb: xhci: request MSI/-X according to requested amount Niklas Neronin
2024-10-17 13:05 ` [PATCH 4/8] usb: xhci: improve xhci_clear_command_ring() Niklas Neronin
2024-10-17 13:05 ` [PATCH 5/8] usb: xhci: remove unused arguments from td_to_noop() Niklas Neronin
2024-10-17 13:05 ` [PATCH 6/8] usb: xhci: refactor xhci_td_cleanup() to return void Niklas Neronin
2024-10-17 13:05 ` [PATCH 7/8] usb: xhci: add help function xhci_dequeue_td() Niklas Neronin
2024-10-17 13:05 ` [PATCH 8/8] usb: xhci: remove irrelevant comment Niklas Neronin
2024-10-30 14:35 ` [PATCH 0/8] usb: xhci: various xhci cleanups and improvements 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=20241017130508.1293021-3-niklas.neronin@linux.intel.com \
    --to=niklas.neronin@linux.intel.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@linux.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 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.