All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: cavium: add missing PCI dependencies
@ 2018-07-17 13:46 Arnd Bergmann
  2018-07-17 14:31 ` Alexander Sverdlin
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Arnd Bergmann @ 2018-07-17 13:46 UTC (permalink / raw)
  To: David S. Miller
  Cc: Arnd Bergmann, Aleksey Makarov, Radoslaw Biernacki,
	Felix Manlunas, Sunil Goutham, Vijaya Mohan Guvva,
	Alexander Sverdlin, netdev, linux-kernel

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(-)

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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] net: cavium: add missing PCI dependencies
  2018-07-17 13:46 [PATCH net-next] net: cavium: add missing PCI dependencies Arnd Bergmann
@ 2018-07-17 14:31 ` Alexander Sverdlin
  2018-07-17 16:00   ` Arnd Bergmann
  2018-07-17 15:11 ` Andrew Lunn
  2018-07-18 20:48 ` David Miller
  2 siblings, 1 reply; 7+ messages in thread
From: Alexander Sverdlin @ 2018-07-17 14:31 UTC (permalink / raw)
  To: Arnd Bergmann, David S. Miller
  Cc: Aleksey Makarov, Radoslaw Biernacki, Felix Manlunas,
	Sunil Goutham, Vijaya Mohan Guvva, netdev, linux-kernel

Hello Arnd,

On 17/07/18 15:46, Arnd Bergmann wrote:
> 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>
> ---
>  drivers/net/ethernet/cavium/Kconfig | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> 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

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

-- 
Best regards,
Alexander Sverdlin.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] net: cavium: add missing PCI dependencies
  2018-07-17 13:46 [PATCH net-next] net: cavium: add missing PCI dependencies Arnd Bergmann
  2018-07-17 14:31 ` Alexander Sverdlin
@ 2018-07-17 15:11 ` Andrew Lunn
  2018-07-17 15:38   ` Alexander Sverdlin
  2018-07-18 20:48 ` David Miller
  2 siblings, 1 reply; 7+ messages in thread
From: Andrew Lunn @ 2018-07-17 15:11 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: David S. Miller, Aleksey Makarov, Radoslaw Biernacki,
	Felix Manlunas, Sunil Goutham, Vijaya Mohan Guvva,
	Alexander Sverdlin, netdev, linux-kernel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] net: cavium: add missing PCI dependencies
  2018-07-17 15:11 ` Andrew Lunn
@ 2018-07-17 15:38   ` Alexander Sverdlin
  2018-07-17 15:57     ` Andrew Lunn
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Sverdlin @ 2018-07-17 15:38 UTC (permalink / raw)
  To: Andrew Lunn, Arnd Bergmann
  Cc: David S. Miller, Aleksey Makarov, Radoslaw Biernacki,
	Felix Manlunas, Sunil Goutham, Vijaya Mohan Guvva, netdev,
	linux-kernel

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.

-- 
Best regards,
Alexander Sverdlin.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] net: cavium: add missing PCI dependencies
  2018-07-17 15:38   ` Alexander Sverdlin
@ 2018-07-17 15:57     ` Andrew Lunn
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2018-07-17 15:57 UTC (permalink / raw)
  To: Alexander Sverdlin
  Cc: Arnd Bergmann, David S. Miller, Aleksey Makarov,
	Radoslaw Biernacki, Felix Manlunas, Sunil Goutham,
	Vijaya Mohan Guvva, netdev, linux-kernel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] net: cavium: add missing PCI dependencies
  2018-07-17 14:31 ` Alexander Sverdlin
@ 2018-07-17 16:00   ` Arnd Bergmann
  0 siblings, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2018-07-17 16:00 UTC (permalink / raw)
  To: Alexander Sverdlin
  Cc: David S. Miller, Aleksey Makarov, Radoslaw Biernacki,
	Felix Manlunas, Sunil Goutham, Vijaya Mohan Guvva, Networking,
	Linux Kernel Mailing List

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] net: cavium: add missing PCI dependencies
  2018-07-17 13:46 [PATCH net-next] net: cavium: add missing PCI dependencies Arnd Bergmann
  2018-07-17 14:31 ` Alexander Sverdlin
  2018-07-17 15:11 ` Andrew Lunn
@ 2018-07-18 20:48 ` David Miller
  2 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2018-07-18 20:48 UTC (permalink / raw)
  To: arnd
  Cc: aleksey.makarov, rad, felix.manlunas, sgoutham, vijaya.guvva,
	alexander.sverdlin, netdev, linux-kernel

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-07-18 20:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-17 13:46 [PATCH net-next] net: cavium: add missing PCI dependencies Arnd Bergmann
2018-07-17 14:31 ` Alexander Sverdlin
2018-07-17 16:00   ` Arnd Bergmann
2018-07-17 15:11 ` Andrew Lunn
2018-07-17 15:38   ` Alexander Sverdlin
2018-07-17 15:57     ` Andrew Lunn
2018-07-18 20:48 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.