diff mbox

cxgb{3,4}: streamline Kconfig options

Message ID 4D680842.6050309@chelsio.com
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

Dimitris Michailidis Feb. 25, 2011, 7:51 p.m. UTC
Dimitris Michailidis wrote:
> Jan Beulich wrote:
> 
>> As to that INET vs NET dependency - is it possible that the
>> network drivers really just need NET, but the iSCSI ones need
>> INET? In which case the only common dependency would be
>> PCI - certainly not worth a custom helper option.
> 
> Reading the commit message that introduced CHELSIO_T3_DEPENDS, it talks 
> of hidden dependencies that select does not see.  I am not sure which 
> exactly but since it's been a few years since that commit I'll try to 
> see what the situation is today without the *_DEPENDS symbols and let 
> you know.

I looked into this and found that with the current Kconfig the iSCSI driver 
does not appear in the SCSI menu until one first enables NETDEVICES and 
NETDEV_10000 in the network driver menu.  It appears that the *_DEPENDS 
symbols were added to capture dependencies on such symbols within the 
network driver Kconfig, besides the dependencies the driver's entry listed 
explicitly.

The patch below removes *T4*_DEPENDS and the network drivers' unnecessary 
dependency on INET, and updates the iSCSI driver's entry so it is visible 
without requiring any net driver options to be enabled first and has 
adequate selects to be able to build the net driver (this part is adapted 
from bnx2i's Kconfig entry).  I still need to do the T3 part of this and 
check that there isn't a conflict with the current scsi tree.  Just for 
review at this time.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Jan Beulich Feb. 28, 2011, 8:19 a.m. UTC | #1
>>> On 25.02.11 at 20:51, Dimitris Michailidis <dm@chelsio.com> wrote:
> Dimitris Michailidis wrote:
>> Jan Beulich wrote:
>> 
>>> As to that INET vs NET dependency - is it possible that the
>>> network drivers really just need NET, but the iSCSI ones need
>>> INET? In which case the only common dependency would be
>>> PCI - certainly not worth a custom helper option.
>> 
>> Reading the commit message that introduced CHELSIO_T3_DEPENDS, it talks 
>> of hidden dependencies that select does not see.  I am not sure which 
>> exactly but since it's been a few years since that commit I'll try to 
>> see what the situation is today without the *_DEPENDS symbols and let 
>> you know.
> 
> I looked into this and found that with the current Kconfig the iSCSI driver 
> does not appear in the SCSI menu until one first enables NETDEVICES and 
> NETDEV_10000 in the network driver menu.  It appears that the *_DEPENDS 
> symbols were added to capture dependencies on such symbols within the 
> network driver Kconfig, besides the dependencies the driver's entry listed 
> explicitly.
> 
> The patch below removes *T4*_DEPENDS and the network drivers' unnecessary 
> dependency on INET, and updates the iSCSI driver's entry so it is visible 
> without requiring any net driver options to be enabled first and has 
> adequate selects to be able to build the net driver (this part is adapted 
> from bnx2i's Kconfig entry).  I still need to do the T3 part of this and 
> check that there isn't a conflict with the current scsi tree.  Just for 
> review at this time.

Thanks, this looks good to me.

Jan

> diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
> index 0382332..0d314d5 100644
> --- a/drivers/net/Kconfig
> +++ b/drivers/net/Kconfig
> @@ -2619,14 +2619,9 @@ config CHELSIO_T3
>   	  To compile this driver as a module, choose M here: the module
>   	  will be called cxgb3.
> 
> -config CHELSIO_T4_DEPENDS
> -	tristate
> -	depends on PCI && INET
> -	default y
> -
>   config CHELSIO_T4
>   	tristate "Chelsio Communications T4 Ethernet support"
> -	depends on CHELSIO_T4_DEPENDS
> +	depends on PCI
>   	select FW_LOADER
>   	select MDIO
>   	help
> @@ -2644,14 +2639,9 @@ config CHELSIO_T4
>   	  To compile this driver as a module choose M here; the module
>   	  will be called cxgb4.
> 
> -config CHELSIO_T4VF_DEPENDS
> -	tristate
> -	depends on PCI && INET
> -	default y
> -
>   config CHELSIO_T4VF
>   	tristate "Chelsio Communications T4 Virtual Function Ethernet support"
> -	depends on CHELSIO_T4VF_DEPENDS
> +	depends on PCI
>   	help
>   	  This driver supports Chelsio T4-based gigabit and 10Gb Ethernet
>   	  adapters with PCI-E SR-IOV Virtual Functions.
> diff --git a/drivers/scsi/cxgbi/cxgb4i/Kconfig 
> b/drivers/scsi/cxgbi/cxgb4i/Kconfig
> index bb94b39..d5302c2 100644
> --- a/drivers/scsi/cxgbi/cxgb4i/Kconfig
> +++ b/drivers/scsi/cxgbi/cxgb4i/Kconfig
> @@ -1,6 +1,8 @@
>   config SCSI_CXGB4_ISCSI
>   	tristate "Chelsio T4 iSCSI support"
> -	depends on CHELSIO_T4_DEPENDS
> +	depends on PCI && INET
> +	select NETDEVICES
> +	select NETDEV_10000
>   	select CHELSIO_T4
>   	select SCSI_ISCSI_ATTRS
>   	---help---



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Feb. 28, 2011, 9:19 p.m. UTC | #2
From: "Jan Beulich" <JBeulich@novell.com>
Date: Mon, 28 Feb 2011 08:19:58 +0000

>>>> On 25.02.11 at 20:51, Dimitris Michailidis <dm@chelsio.com> wrote:
>> Dimitris Michailidis wrote:
>>> Jan Beulich wrote:
>>> 
>>>> As to that INET vs NET dependency - is it possible that the
>>>> network drivers really just need NET, but the iSCSI ones need
>>>> INET? In which case the only common dependency would be
>>>> PCI - certainly not worth a custom helper option.
>>> 
>>> Reading the commit message that introduced CHELSIO_T3_DEPENDS, it talks 
>>> of hidden dependencies that select does not see.  I am not sure which 
>>> exactly but since it's been a few years since that commit I'll try to 
>>> see what the situation is today without the *_DEPENDS symbols and let 
>>> you know.
>> 
>> I looked into this and found that with the current Kconfig the iSCSI driver 
>> does not appear in the SCSI menu until one first enables NETDEVICES and 
>> NETDEV_10000 in the network driver menu.  It appears that the *_DEPENDS 
>> symbols were added to capture dependencies on such symbols within the 
>> network driver Kconfig, besides the dependencies the driver's entry listed 
>> explicitly.
>> 
>> The patch below removes *T4*_DEPENDS and the network drivers' unnecessary 
>> dependency on INET, and updates the iSCSI driver's entry so it is visible 
>> without requiring any net driver options to be enabled first and has 
>> adequate selects to be able to build the net driver (this part is adapted 
>> from bnx2i's Kconfig entry).  I still need to do the T3 part of this and 
>> check that there isn't a conflict with the current scsi tree.  Just for 
>> review at this time.
> 
> Thanks, this looks good to me.

Dimitris, please submit this anew with a proper commit log messag and
signoff.  Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 0382332..0d314d5 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2619,14 +2619,9 @@  config CHELSIO_T3
  	  To compile this driver as a module, choose M here: the module
  	  will be called cxgb3.

-config CHELSIO_T4_DEPENDS
-	tristate
-	depends on PCI && INET
-	default y
-
  config CHELSIO_T4
  	tristate "Chelsio Communications T4 Ethernet support"
-	depends on CHELSIO_T4_DEPENDS
+	depends on PCI
  	select FW_LOADER
  	select MDIO
  	help
@@ -2644,14 +2639,9 @@  config CHELSIO_T4
  	  To compile this driver as a module choose M here; the module
  	  will be called cxgb4.

-config CHELSIO_T4VF_DEPENDS
-	tristate
-	depends on PCI && INET
-	default y
-
  config CHELSIO_T4VF
  	tristate "Chelsio Communications T4 Virtual Function Ethernet support"
-	depends on CHELSIO_T4VF_DEPENDS
+	depends on PCI
  	help
  	  This driver supports Chelsio T4-based gigabit and 10Gb Ethernet
  	  adapters with PCI-E SR-IOV Virtual Functions.
diff --git a/drivers/scsi/cxgbi/cxgb4i/Kconfig 
b/drivers/scsi/cxgbi/cxgb4i/Kconfig
index bb94b39..d5302c2 100644
--- a/drivers/scsi/cxgbi/cxgb4i/Kconfig
+++ b/drivers/scsi/cxgbi/cxgb4i/Kconfig
@@ -1,6 +1,8 @@ 
  config SCSI_CXGB4_ISCSI
  	tristate "Chelsio T4 iSCSI support"
-	depends on CHELSIO_T4_DEPENDS
+	depends on PCI && INET
+	select NETDEVICES
+	select NETDEV_10000
  	select CHELSIO_T4
  	select SCSI_ISCSI_ATTRS
  	---help---