Skip to content

Commit 121d57f

Browse files
Michal Peciojfvogel
authored andcommitted
usb: xhci: Restore xhci_pci support for Renesas HCs
commit c81d9fc upstream. Some Renesas HCs require firmware upload to work, this is handled by the xhci_pci_renesas driver. Other variants of those chips load firmware from a SPI flash and are ready to work with xhci_pci alone. A refactor merged in v6.12 broke the latter configuration so that users are finding their hardware ignored by the normal driver and are forced to enable the firmware loader which isn't really necessary on their systems. Let xhci_pci work with those chips as before when the firmware loader is disabled by kernel configuration. Fixes: 25f51b7 ("xhci-pci: Make xhci-pci-renesas a proper modular driver") Cc: stable <stable@kernel.org> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219616 Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219726 Signed-off-by: Michal Pecio <michal.pecio@gmail.com> Tested-by: Nicolai Buchwitz <nb@tipi-net.de> Link: https://lore.kernel.org/r/20250128104529.58a79bfc@foxbook Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit f3b755022f5c6b6459bc64176e1737df998eccda) Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
1 parent 43e981a commit 121d57f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/usb/host/xhci-pci.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -656,16 +656,17 @@ int xhci_pci_common_probe(struct pci_dev *dev, const struct pci_device_id *id)
656656
}
657657
EXPORT_SYMBOL_NS_GPL(xhci_pci_common_probe, xhci);
658658

659-
static const struct pci_device_id pci_ids_reject[] = {
660-
/* handled by xhci-pci-renesas */
659+
/* handled by xhci-pci-renesas if enabled */
660+
static const struct pci_device_id pci_ids_renesas[] = {
661661
{ PCI_DEVICE(PCI_VENDOR_ID_RENESAS, 0x0014) },
662662
{ PCI_DEVICE(PCI_VENDOR_ID_RENESAS, 0x0015) },
663663
{ /* end: all zeroes */ }
664664
};
665665

666666
static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
667667
{
668-
if (pci_match_id(pci_ids_reject, dev))
668+
if (IS_ENABLED(CONFIG_USB_XHCI_PCI_RENESAS) &&
669+
pci_match_id(pci_ids_renesas, dev))
669670
return -ENODEV;
670671

671672
return xhci_pci_common_probe(dev, id);

0 commit comments

Comments
 (0)