diff mbox series

[net-next] net: cavium: add missing PCI dependencies

Message ID 20180717134756.3447762-1-arnd@arndb.de
State Accepted
Commit 74525cc5f5f7c02f02ed356a37af5c0564ad9565
Headers show
Series [net-next] net: cavium: add missing PCI dependencies | expand

Commit Message

Arnd Bergmann July 17, 2018, 1:46 p.m. UTC
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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 drivers/net/ethernet/cavium/Kconfig | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

-- 
2.9.0

Comments

Andrew Lunn July 17, 2018, 3:11 p.m. UTC | #1
On Tue, Jul 17, 2018 at 03:46:34PM +0200, Arnd Bergmann wrote:
> 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
Andrew Lunn July 17, 2018, 3:57 p.m. UTC | #2
On Tue, Jul 17, 2018 at 05:38:59PM +0200, Alexander Sverdlin wrote:
> Hello Andrew,

> 

> On 17/07/18 17:11, Andrew Lunn wrote:

> > 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.


Ah, O.K. Thanks for the explanation.

       Andrew
Arnd Bergmann July 17, 2018, 4 p.m. UTC | #3
On Tue, Jul 17, 2018 at 4:31 PM, Alexander Sverdlin
<alexander.sverdlin@nokia.com> wrote:

>> @@ -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.


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.

> 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
David Miller July 18, 2018, 8:48 p.m. UTC | #4
From: Arnd Bergmann <arnd@arndb.de>

Date: Tue, 17 Jul 2018 15:46:34 +0200

> While some of the cavium drivers don't require PCI support, most

> others do, as shown by these build failures:

 ...
> 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")

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>


Applied, thanks Arnd.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/cavium/Kconfig b/drivers/net/ethernet/cavium/Kconfig
index 4c3a5c354497..80e2e93e4aad 100644
--- a/drivers/net/ethernet/cavium/Kconfig
+++ b/drivers/net/ethernet/cavium/Kconfig
@@ -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