]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
xhci: Combine two if statements for Etron xHCI host
authorKuangyi Chiang <ki.chiang65@gmail.com>
Wed, 6 Nov 2024 10:14:43 +0000 (12:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Nov 2024 12:26:15 +0000 (13:26 +0100)
Combine two if statements, because these hosts have the same
quirk flags applied.

[Mathias: has stable tag because other fixes in series depend on this]

Fixes: 91f7a1524a92 ("xhci: Apply broken streams quirk to Etron EJ188 xHCI host")
Cc: stable@vger.kernel.org
Signed-off-by: Kuangyi Chiang <ki.chiang65@gmail.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20241106101459.775897-18-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-pci.c

index 7803ff1f1c9f8d06c7b88bfb692c6557f266a359..db3c7e738213794c5c5bf1ea751afa1ecf796cb9 100644 (file)
@@ -394,12 +394,8 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
                xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
 
        if (pdev->vendor == PCI_VENDOR_ID_ETRON &&
-                       pdev->device == PCI_DEVICE_ID_EJ168) {
-               xhci->quirks |= XHCI_RESET_ON_RESUME;
-               xhci->quirks |= XHCI_BROKEN_STREAMS;
-       }
-       if (pdev->vendor == PCI_VENDOR_ID_ETRON &&
-                       pdev->device == PCI_DEVICE_ID_EJ188) {
+           (pdev->device == PCI_DEVICE_ID_EJ168 ||
+            pdev->device == PCI_DEVICE_ID_EJ188)) {
                xhci->quirks |= XHCI_RESET_ON_RESUME;
                xhci->quirks |= XHCI_BROKEN_STREAMS;
        }