Skip to contentSkip to conversation

usb: xhci: Restore Renesas uPD72020x support in xhci-pci

PATCH In review [email protected] 3 participants 5 messages Feb 3, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: xhci: Restore Renesas uPD72020x support in xhci-pci

From: Nicolai Buchwitz <[email protected]>

Before commit 25f51b76f90f1 ("xhci-pci: Make xhci-pci-renesas a proper modular driver"), the xhci-pci driver handled the Renesas uPD72020x USB3 PHY and only utilized features of xhci-pci-renesas when no external firmware EEPROM was attached. This allowed devices with a valid firmware stored in EEPROM to function without requiring xhci-pci-renesas.

That commit changed the behavior, making xhci-pci-renesas responsible for handling these devices entirely, even when firmware was already present in EEPROM. As a result, unnecessary warnings about missing firmware files appeared, and more critically, USB functionality broke whens CONFIG_USB_XHCI_PCI_RENESAS was not enabled—despite previously workings without it.

Fix this by ensuring that devices are only handed over to xhci-pci-renesas if the config option is enabled. Otherwise, restore the original behavior and handle them as standard xhci-pci devices.

Fixes 25f51b76f90f ("xhci-pci: Make xhci-pci-renesas a proper modular driver")
---
 drivers/usb/host/xhci-pci.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/usb/host/xhci-pci.c +2 -0
index 2d1e205c14c60..4ce80d8ac603e 100644
@@ -654,9 +654,11 @@ int xhci_pci_common_probe(struct pci_dev *dev, const struct pci_device_id *id)
 EXPORT_SYMBOL_NS_GPL(xhci_pci_common_probe, "xhci");
 
 static const struct pci_device_id pci_ids_reject[] = {
+#if IS_ENABLED(CONFIG_USB_XHCI_PCI_RENESAS)
 	/* handled by xhci-pci-renesas */
 	{ PCI_DEVICE(PCI_VENDOR_ID_RENESAS, 0x0014) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_RENESAS, 0x0015) },
+#endif
 	{ /* end: all zeroes */ }
 };
 
Signature · 1 line
2.39.5
#1 lore raw
FYI: kernel test robot notices the stable kernel rule is not satisfied.

Hi,

Thanks for your patch.

FYI: kernel test robot notices the stable kernel rule is not satisfied.

The check is based on https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html#option-1

Rule: add the tag "Cc: [email protected]" in the sign-off area to have the patch automatically included in the stable tree.
Subject: [PATCH] usb: xhci: Restore Renesas uPD72020x support in xhci-pci

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#2 lore raw
In reply to [email protected]
Quoted 30 lines · On Mon, Feb 03, 2025 at 01:00:26PM +0100, [email protected] wrote:

From: Nicolai Buchwitz <[email protected]>

Before commit 25f51b76f90f1 ("xhci-pci: Make xhci-pci-renesas a proper modular driver"), the xhci-pci driver handled the Renesas uPD72020x USB3 PHY and only utilized features of xhci-pci-renesas when no external firmware EEPROM was attached. This allowed devices with a valid firmware stored in EEPROM to function without requiring xhci-pci-renesas.

That commit changed the behavior, making xhci-pci-renesas responsible for handling these devices entirely, even when firmware was already present in EEPROM. As a result, unnecessary warnings about missing firmware files appeared, and more critically, USB functionality broke whens CONFIG_USB_XHCI_PCI_RENESAS was not enabled—despite previously workings without it.

Fix this by ensuring that devices are only handed over to xhci-pci-renesas if the config option is enabled. Otherwise, restore the original behavior and handle them as standard xhci-pci devices.

Fixes 25f51b76f90f ("xhci-pci: Make xhci-pci-renesas a proper modular driver")
---
 drivers/usb/host/xhci-pci.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/usb/host/xhci-pci.c +0 -0
index 2d1e205c14c60..4ce80d8ac603e 100644

drivers/usb/host/xhci-pci.c int xhci_pci_common_probe(struct pci_dev *dev, const struct pci_device_id *id) · line 663

Quoted 10 lines
drivers/usb/host/xhci-pci.c +2 -0
@@ -654,9 +654,11 @@ int xhci_pci_common_probe(struct pci_dev *dev, const struct pci_device_id *id)
 EXPORT_SYMBOL_NS_GPL(xhci_pci_common_probe, "xhci");
 
 static const struct pci_device_id pci_ids_reject[] = {
+#if IS_ENABLED(CONFIG_USB_XHCI_PCI_RENESAS)
 	/* handled by xhci-pci-renesas */
 	{ PCI_DEVICE(PCI_VENDOR_ID_RENESAS, 0x0014) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_RENESAS, 0x0015) },
+#endif
 	{ /* end: all zeroes */ }
 };

Have you seen:

	https://lore.kernel.org/r/20250128104529.58a79bfc@foxbook

?

Which one is correct?

thanks,

greg k-h

#3 lore raw
Quoted 44 lines · Greg Kroah-Hartman
Quoted 31 lines · On Mon, Feb 03, 2025 at 01:00:26PM +0100, [email protected] wrote:

From: Nicolai Buchwitz <[email protected]>

Before commit 25f51b76f90f1 ("xhci-pci: Make xhci-pci-renesas a proper modular driver"), the xhci-pci driver handled the Renesas uPD72020x USB3 PHY and only utilized features of xhci-pci-renesas when no external firmware EEPROM was attached. This allowed devices with a valid firmware stored in EEPROM to function without requiring xhci-pci-renesas.

That commit changed the behavior, making xhci-pci-renesas responsible for handling these devices entirely, even when firmware was already present in EEPROM. As a result, unnecessary warnings about missing firmware files appeared, and more critically, USB functionality broke whens CONFIG_USB_XHCI_PCI_RENESAS was not enabled—despite previously workings without it.

Fix this by ensuring that devices are only handed over to xhci-pci-renesas if the config option is enabled. Otherwise, restore the original behavior and handle them as standard xhci-pci devices.

Fixes 25f51b76f90f ("xhci-pci: Make xhci-pci-renesas a proper modular driver")
---
 drivers/usb/host/xhci-pci.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/usb/host/xhci-pci.c +0 -0
index 2d1e205c14c60..4ce80d8ac603e 100644
@@ -654,9 +654,11 @@ int xhci_pci_common_probe(struct pci_dev *dev, 
 const struct pci_device_id *id)

drivers/usb/host/xhci-pci.c int xhci_pci_common_probe(struct pci_dev *dev, · line 664

Quoted 10 lines
drivers/usb/host/xhci-pci.c +2 -0
 EXPORT_SYMBOL_NS_GPL(xhci_pci_common_probe, "xhci");
 
 static const struct pci_device_id pci_ids_reject[] = {
+#if IS_ENABLED(CONFIG_USB_XHCI_PCI_RENESAS)
 	/* handled by xhci-pci-renesas */
 	{ PCI_DEVICE(PCI_VENDOR_ID_RENESAS, 0x0014) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_RENESAS, 0x0015) },
+#endif
 	{ /* end: all zeroes */ }
 };

Have you seen:

Quoted 2 lines
	https://lore.kernel.org/r/20250128104529.58a79bfc@foxbook

?

Hi Greg.

Thanks, I must have overlooked Michal's patch when I initially stumbled over the issue.

Quoted 2 lines

Which one is correct?

I guess both, as Michal is implementing the same slightly different.

My approach was to to keep the changes less invasive as possible and thus make it possible to use pci_ids_reject[] for further exceptions in the xhci-pci driver. In Michael's patch the list is specifically used for blacklisting the Renesas devices and cannot easily be expanded for other controllers. Either approach is fine with me, so lets move the discussion to the patch which came first.

Quoted 4 lines

thanks,

greg k-h

best,
Nicolai

#4 lore raw
Quoted 63 lines · On Mon, Feb 03, 2025 at 02:00:55PM +0100, [email protected] wrote:
Quoted 53 lines · Greg Kroah-Hartman
Quoted 40 lines · On Mon, Feb 03, 2025 at 01:00:26PM +0100, [email protected] wrote:

From: Nicolai Buchwitz <[email protected]>

Before commit 25f51b76f90f1 ("xhci-pci: Make xhci-pci-renesas a proper modular driver"), the xhci-pci driver handled the Renesas uPD72020x USB3
PHY and only utilized features of xhci-pci-renesas when no external firmware EEPROM was attached. This allowed devices with a valid firmware
stored in EEPROM to function without requiring xhci-pci-renesas.

That commit changed the behavior, making xhci-pci-renesas responsible for
handling these devices entirely, even when firmware was already present
in EEPROM. As a result, unnecessary warnings about missing firmware files
appeared, and more critically, USB functionality broke whens CONFIG_USB_XHCI_PCI_RENESAS was not enabled—despite previously workings
without it.

Fix this by ensuring that devices are only handed over to xhci-pci-renesas
if the config option is enabled. Otherwise, restore the original behavior
and handle them as standard xhci-pci devices.

Fixes 25f51b76f90f ("xhci-pci: Make xhci-pci-renesas a proper

modular driver")

---
 drivers/usb/host/xhci-pci.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/usb/host/xhci-pci.c +0 -0
index 2d1e205c14c60..4ce80d8ac603e 100644
@@ -654,9 +654,11 @@ int xhci_pci_common_probe(struct pci_dev *dev,
 const struct pci_device_id *id)

drivers/usb/host/xhci-pci.c int xhci_pci_common_probe(struct pci_dev *dev, · line 664

Quoted 10 lines
drivers/usb/host/xhci-pci.c +2 -0
 EXPORT_SYMBOL_NS_GPL(xhci_pci_common_probe, "xhci");
 
 static const struct pci_device_id pci_ids_reject[] = {
+#if IS_ENABLED(CONFIG_USB_XHCI_PCI_RENESAS)
 	/* handled by xhci-pci-renesas */
 	{ PCI_DEVICE(PCI_VENDOR_ID_RENESAS, 0x0014) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_RENESAS, 0x0015) },
+#endif
 	{ /* end: all zeroes */ }
 };

Have you seen:

Quoted 2 lines
	https://lore.kernel.org/r/20250128104529.58a79bfc@foxbook

?

Hi Greg.

Thanks, I must have overlooked Michal's patch when I initially stumbled over the issue.

Quoted 2 lines

Which one is correct?

Quoted 8 lines

I guess both, as Michal is implementing the same slightly different.

My approach was to to keep the changes less invasive as possible and thus make it possible to use pci_ids_reject[] for further exceptions in the xhci-pci driver. In Michael's patch the list is specifically used for blacklisting the Renesas devices and cannot easily be expanded for other controllers. Either approach is fine with me, so lets move the discussion to the patch which came first.

Ok, can you test Michael's patch and respond with a tested-by if it works for you?

thanks,

greg k-h