Skip to contentSkip to conversation

net: cavium: add missing PCI dependencies

PATCH Applied Arnd Bergmann 4 participants 7 messages Jul 17, 2018 – Jul 18, 2018

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

PATCH 1/1 net: cavium: add missing PCI dependencies

While some of the cavium drivers don't require PCI support, most others do, as shown by these build failures:

WARNING: unmet direct dependencies detected for MDIO_THUNDER
Depends on [n]: NETDEVICES [=y] && MDIO_BUS [=y] && 64BIT [=y] && PCI [=n]
Selected by [y]:
- THUNDER_NIC_BGX [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_CAVIUM [=y] && 64BIT [=y]
- THUNDER_NIC_RGX [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_CAVIUM [=y] && 64BIT [=y]
drivers/net/ethernet/cavium/thunder/nicvf_main.c: In function 'nicvf_set_irq_affinity':
drivers/net/ethernet/cavium/thunder/nicvf_main.c:1095:25: error: implicit declaration of function 'pci_irq_vector'; did you mean 'rcu_irq_enter'? [-Werror=implicit-function-declaration] drivers/net/ethernet/cavium/thunder/nic_main.c: In function 'nic_mbx_intr_handler':
drivers/net/ethernet/cavium/thunder/nic_main.c:1135:13: error: implicit declaration of function 'pci_irq_vector'; did you mean 'rcu_irq_enter'? [-Werror=implicit-function-declaration] In file included from drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:27:
drivers/net/ethernet/cavium/liquidio/octeon_main.h: In function 'octeon_unmap_pci_barx':
drivers/net/ethernet/cavium/liquidio/octeon_main.h:97:3: error: implicit declaration of function 'pci_release_region'; did you mean 'pci_release_regions'? [-Werror=implicit-function-declaration] drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c: In function 'octeon_mbox_process_cmd':
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:263:3: error: implicit declaration of function 'pcie_capability_set_word'; did you mean 'has_capability_noaudit'? [-Werror=implicit-function-declaration] drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c: In function 'setup_cn23xx_octeon_pf_device':
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:1315:22: error: 'data32' is used uninitialized in this function [-Werror=uninitialized] drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c: In function 'cn23xx_dump_vf_iq_regs':
include/linux/dynamic_debug.h:135:3: error: 'regval' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/net/ethernet/cavium/liquidio/lio_core.c: In function 'octeon_setup_interrupt':
drivers/net/ethernet/cavium/liquidio/lio_core.c:1067:17: error: invalid application of 'sizeof' to incomplete type 'struct msix_entry' drivers/net/ethernet/cavium/liquidio/octeon_main.h: In function 'octeon_unmap_pci_barx':
drivers/net/ethernet/cavium/liquidio/octeon_main.h:97:3: error: implicit declaration of function 'pci_release_region'; did you mean 'pci_release_regions'? [-Werror=implicit-function-declaration]

This adds back the minimum set of dependencies to get everything to build cleanly again, but leaving the ones that build cleanly.

Fixes 7e2bc7fb65d5 ("net: cavium: Drop dependency of NET_VENDOR_CAVIUM on PCI")
---
 drivers/net/ethernet/cavium/Kconfig | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/net/ethernet/cavium/Kconfig +6 -4
index 4c3a5c354497..80e2e93e4aad 100644
@@ -14,7 +14,7 @@ if NET_VENDOR_CAVIUM
 
 config THUNDER_NIC_PF
 	tristate "Thunder Physical function driver"
-	depends on 64BIT
+	depends on 64BIT && PCI
 	select THUNDER_NIC_BGX
 	---help---
 	  This driver supports Thunder's NIC physical function.
@@ -27,7 +27,7 @@ config THUNDER_NIC_PF
 config THUNDER_NIC_VF
 	tristate "Thunder Virtual function driver"
 	imply CAVIUM_PTP
-	depends on 64BIT
+	depends on 64BIT && PCI
 	---help---
 	  This driver supports Thunder's NIC virtual function
 
@@ -35,7 +35,7 @@ config	THUNDER_NIC_BGX
 	tristate "Thunder MAC interface driver (BGX)"
 	depends on 64BIT
 	select PHYLIB
-	select MDIO_THUNDER
+	select MDIO_THUNDER if PCI
 	select THUNDER_NIC_RGX
 	---help---
 	  This driver supports programming and controlling of MAC
@@ -45,7 +45,7 @@ config	THUNDER_NIC_RGX
 	tristate "Thunder MAC interface driver (RGX)"
 	depends on 64BIT
 	select PHYLIB
-	select MDIO_THUNDER
+	select MDIO_THUNDER if PCI
 	---help---
 	  This driver supports configuring XCV block of RGX interface
 	  present on CN81XX chip.
@@ -53,6 +53,7 @@ config	THUNDER_NIC_RGX
 config CAVIUM_PTP
 	tristate "Cavium PTP coprocessor as PTP clock"
 	depends on 64BIT
+	depends on PCI
 	imply PTP_1588_CLOCK
 	default y
 	---help---
@@ -66,6 +67,7 @@ config LIQUIDIO
 	tristate "Cavium LiquidIO support"
 	depends on 64BIT
 	depends on MAY_USE_DEVLINK
+	depends on PCI
 	imply PTP_1588_CLOCK
 	select FW_LOADER
 	select LIBCRC32C
Signature · 1 line
2.9.0
#1 lore raw

Hello Arnd,

Quoted 2 lines · Arnd Bergmann

While some of the cavium drivers don't require PCI support, most others do, as shown by these build failures:

[...]

Quoted 32 lines

This adds back the minimum set of dependencies to get everything to build cleanly again, but leaving the ones that build cleanly.

Fixes 7e2bc7fb65d5 ("net: cavium: Drop dependency of NET_VENDOR_CAVIUM on PCI")
---
 drivers/net/ethernet/cavium/Kconfig | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/net/ethernet/cavium/Kconfig +2 -2
index 4c3a5c354497..80e2e93e4aad 100644
@@ -14,7 +14,7 @@ if NET_VENDOR_CAVIUM
 
 config THUNDER_NIC_PF
 	tristate "Thunder Physical function driver"
-	depends on 64BIT
+	depends on 64BIT && PCI
 	select THUNDER_NIC_BGX
 	---help---
 	  This driver supports Thunder's NIC physical function.
@@ -27,7 +27,7 @@ config THUNDER_NIC_PF
 config THUNDER_NIC_VF
 	tristate "Thunder Virtual function driver"
 	imply CAVIUM_PTP
-	depends on 64BIT
+	depends on 64BIT && PCI
 	---help---
 	  This driver supports Thunder's NIC virtual function
 

drivers/net/ethernet/cavium/Kconfig config THUNDER_NIC_BGX · line 41

Quoted 8 lines
drivers/net/ethernet/cavium/Kconfig +1 -1
@@ -35,7 +35,7 @@ config	THUNDER_NIC_BGX
 	tristate "Thunder MAC interface driver (BGX)"
 	depends on 64BIT
 	select PHYLIB
-	select MDIO_THUNDER
+	select MDIO_THUNDER if PCI
 	select THUNDER_NIC_RGX
 	---help---
 	  This driver supports programming and controlling of MAC

I believe this hunk should look exactly as the previous one, i.e. 64BIT && PCI, BGX itself depends on PCI as well. I've actually sent v2 to fix the above, but got no reply on it up to now...

Signature · 2 lines
Best regards,
Alexander Sverdlin.
#2 lore raw
Quoted 4 lines · Alexander Sverdlin
Quoted 4 lines
drivers/net/ethernet/cavium/Kconfig +0 -0
@@ -35,7 +35,7 @@ config      THUNDER_NIC_BGX
      tristate "Thunder MAC interface driver (BGX)"
      depends on 64BIT
      select PHYLIB
Quoted 8 lines

drivers/net/ethernet/cavium/Kconfig config THUNDER_NIC_BGX · line 41

Quoted 5 lines
drivers/net/ethernet/cavium/Kconfig +1 -1
-     select MDIO_THUNDER
+     select MDIO_THUNDER if PCI
      select THUNDER_NIC_RGX
      ---help---
        This driver supports programming and controlling of MAC

I believe this hunk should look exactly as the previous one, i.e. 64BIT && PCI, BGX itself depends on PCI as well.

That would work as well. My approach was to allow compiling that driver with PCI because I got no build failures other than the MDIO_THUNDER issues.

Quoted 1 line

I've actually sent v2 to fix the above, but got no reply on it up to now...

Your patch was applied into net-next already, so you need to send a fix relative to your first patch rather than a replacement.

Arnd

#3 lore raw
In reply to Arnd Bergmann
Quoted 2 lines · Arnd Bergmann

While some of the cavium drivers don't require PCI support, most others do, as shown by these build failures:

Hi Arnd

FYI

There is a 0-day email about mdio-thunder.c also failing. It looks like a missing PCI dependency as well, although i cannot find the patch which removed the existing dependency.

Andrew

#4 lore raw

Hello Andrew,

Quoted 5 lines · Andrew Lunn

FYI

There is a 0-day email about mdio-thunder.c also failing. It looks like a missing PCI dependency as well, although i cannot find the patch which removed the existing dependency.

there were no such patch, some Ethernet driver not depending on PCI forcefully selected MDIO_THUNDER. So this is only a side effect of the first error.

Signature · 2 lines
Best regards,
Alexander Sverdlin.
#5 lore raw
Quoted 5 lines · Alexander Sverdlin

Hello Andrew,

Quoted 2 lines · Andrew Lunn

FYI

Quoted 7 lines
Quoted 3 lines

There is a 0-day email about mdio-thunder.c also failing. It looks like a missing PCI dependency as well, although i cannot find the patch which removed the existing dependency.

there were no such patch, some Ethernet driver not depending on PCI forcefully selected MDIO_THUNDER. So this is only a side effect of the first error.

Ah, O.K. Thanks for the explanation.

Andrew

maintainer Applied
#6 lore raw
In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>
Date: Tue, 17 Jul 2018 15:46:34 +0200

Quoted 2 lines

While some of the cavium drivers don't require PCI support, most others do, as shown by these build failures:

...

Quoted 5 lines

This adds back the minimum set of dependencies to get everything to build cleanly again, but leaving the ones that build cleanly.

Fixes 7e2bc7fb65d5 ("net: cavium: Drop dependency of NET_VENDOR_CAVIUM on PCI")

Applied, thanks Arnd.