]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
usb: xhci: move link TRB quirk to xhci_gen_setup()
authorNiklas Neronin <niklas.neronin@linux.intel.com>
Wed, 6 Nov 2024 10:14:50 +0000 (12:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Nov 2024 12:26:15 +0000 (13:26 +0100)
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>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20241106101459.775897-25-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci.c

index a5ac1e01f82da286515c3185ffe4d128eaace83d..e5719fd45a3876e2c573abb16f9e57ae9ccb0cda 100644 (file)
@@ -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");
 
@@ -5311,6 +5304,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)