Skip to contentSkip to conversation

usb: xhci: fix USB_XHCI_PCI depends

PATCH In review Vinod Koul 2 participants 2 messages May 19, 2020

Subsystems (2)
lore
Share & tools
lore

Vinod Koul

author
#0 lore raw

PATCH 1/1 usb: xhci: fix USB_XHCI_PCI depends

The xhci-pci-renesas module exports symbols for xhci-pci to load the RAM/ROM on renesas xhci controllers. We had dependency which works when both the modules are builtin or modules.

But if xhci-pci is inbuilt and xhci-pci-renesas in module, we get below linker error:
drivers/usb/host/xhci-pci.o: In function `xhci_pci_remove':
drivers/usb/host/xhci-pci.c:411: undefined reference to renesas_xhci_pci_exit' drivers/usb/host/xhci-pci.o: In function xhci_pci_probe':
drivers/usb/host/xhci-pci.c:345: undefined reference to `renesas_xhci_check_request_fw'

Fix this by adding USB_XHCI_PCI having depends on USB_XHCI_PCI_RENESAS || !USB_XHCI_PCI_RENESAS so that both can be either inbuilt or modules.

Fixes a66d21d7dba8 ("usb: xhci: Add support for Renesas controller with memory")
---
 drivers/usb/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/Kconfig +1 -1
index b5c542d6a1c5..92783d175b3f 100644
@@ -40,11 +40,11 @@ config USB_XHCI_DBGCAP
 config USB_XHCI_PCI
 	tristate
 	depends on USB_PCI
+	depends on USB_XHCI_PCI_RENESAS || !USB_XHCI_PCI_RENESAS
 	default y
 
 config USB_XHCI_PCI_RENESAS
 	tristate "Support for additional Renesas xHCI controller with firwmare"
-	depends on USB_XHCI_PCI
 	---help---
 	  Say 'Y' to enable the support for the Renesas xHCI controller with
 	  firwmare. Make sure you have the firwmare for the device and
Signature · 1 line
2.25.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Vinod Koul

The xhci-pci-renesas module exports symbols for xhci-pci to load the RAM/ROM on renesas xhci controllers. We had dependency which works when both the modules are builtin or modules.

But if xhci-pci is inbuilt and xhci-pci-renesas in module, we get below linker error:
drivers/usb/host/xhci-pci.o: In function `xhci_pci_remove':
drivers/usb/host/xhci-pci.c:411: undefined reference to renesas_xhci_pci_exit' drivers/usb/host/xhci-pci.o: In function xhci_pci_probe':
drivers/usb/host/xhci-pci.c:345: undefined reference to `renesas_xhci_check_request_fw'

Quoted 3 lines

Fix this by adding USB_XHCI_PCI having depends on USB_XHCI_PCI_RENESAS || !USB_XHCI_PCI_RENESAS so that both can be either inbuilt or modules.

Regards,
Bjorn

Quoted 28 lines
Fixes a66d21d7dba8 ("usb: xhci: Add support for Renesas controller with memory")
---
 drivers/usb/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/Kconfig +1 -1
index b5c542d6a1c5..92783d175b3f 100644
@@ -40,11 +40,11 @@ config USB_XHCI_DBGCAP
 config USB_XHCI_PCI
 	tristate
 	depends on USB_PCI
+	depends on USB_XHCI_PCI_RENESAS || !USB_XHCI_PCI_RENESAS
 	default y
 
 config USB_XHCI_PCI_RENESAS
 	tristate "Support for additional Renesas xHCI controller with firwmare"
-	depends on USB_XHCI_PCI
 	---help---
 	  Say 'Y' to enable the support for the Renesas xHCI controller with
 	  firwmare. Make sure you have the firwmare for the device and
Signature · 1 line
2.25.4