diff mbox series

[net,v3] ixgbe: fix Kconfig when driver is not a module

Message ID 20190104184802.4730-1-jeffrey.t.kirsher@intel.com
State Accepted
Delegated to: David Miller
Headers show
Series [net,v3] ixgbe: fix Kconfig when driver is not a module | expand

Commit Message

Kirsher, Jeffrey T Jan. 4, 2019, 6:48 p.m. UTC
The new ability added to the driver to use mii_bus to handle MII related
ioctls is causing compile issues when the driver is compiled into the
kernel (i.e. not a module).

The problem was in selecting MDIO_DEVICE instead of the preferred PHYLIB
Kconfig option.  The reason being that MDIO_DEVICE had a dependency on
PHYLIB and would be compiled as a module when PHYLIB was a module, no
matter whether ixgbe was compiled into the kernel.

CC: Dave Jones <davej@codemonkey.org.uk>
CC: Steve Douthit <stephend@silicom-usa.com>
CC: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
v2: fixed up the Kconfig help section to include the clause 22/45
  address information and also changed the IXGBE_MDIO config option to be
  dependent upon PHYLIB versus MDIO_BUS since that appears to be the
  common usage

v3: Steve Douthit found a much simpler solution of changing the
  dependency from MDIO_DEVICE to PHYLIB, which is consistent with other
  Ethernet drivers

 drivers/net/ethernet/intel/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stephen Douthit Jan. 4, 2019, 8:40 p.m. UTC | #1
On 1/4/19 1:48 PM, Jeff Kirsher wrote:
> The new ability added to the driver to use mii_bus to handle MII related
> ioctls is causing compile issues when the driver is compiled into the
> kernel (i.e. not a module).
> 
> The problem was in selecting MDIO_DEVICE instead of the preferred PHYLIB
> Kconfig option.  The reason being that MDIO_DEVICE had a dependency on
> PHYLIB and would be compiled as a module when PHYLIB was a module, no
> matter whether ixgbe was compiled into the kernel.
> 
> CC: Dave Jones <davej@codemonkey.org.uk>
> CC: Steve Douthit <stephend@silicom-usa.com>
> CC: Florian Fainelli <f.fainelli@gmail.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
> v2: fixed up the Kconfig help section to include the clause 22/45
>    address information and also changed the IXGBE_MDIO config option to be
>    dependent upon PHYLIB versus MDIO_BUS since that appears to be the
>    common usage
> 
> v3: Steve Douthit found a much simpler solution of changing the
>    dependency from MDIO_DEVICE to PHYLIB, which is consistent with other
>    Ethernet drivers
> 
>   drivers/net/ethernet/intel/Kconfig | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig
> index 31fb76ee9d82..a1246e89aad4 100644
> --- a/drivers/net/ethernet/intel/Kconfig
> +++ b/drivers/net/ethernet/intel/Kconfig
> @@ -159,7 +159,7 @@ config IXGBE
>   	tristate "Intel(R) 10GbE PCI Express adapters support"
>   	depends on PCI
>   	select MDIO
> -	select MDIO_DEVICE
> +	select PHYLIB
>   	imply PTP_1588_CLOCK
>   	---help---
>   	  This driver supports Intel(R) 10GbE PCI Express family of
> 

Reviewed-by: Stephen Douthit <stephend@silicom-usa.com>
Florian Fainelli Jan. 4, 2019, 8:43 p.m. UTC | #2
On 1/4/19 10:48 AM, Jeff Kirsher wrote:
> The new ability added to the driver to use mii_bus to handle MII related
> ioctls is causing compile issues when the driver is compiled into the
> kernel (i.e. not a module).
> 
> The problem was in selecting MDIO_DEVICE instead of the preferred PHYLIB
> Kconfig option.  The reason being that MDIO_DEVICE had a dependency on
> PHYLIB and would be compiled as a module when PHYLIB was a module, no
> matter whether ixgbe was compiled into the kernel.
> 
> CC: Dave Jones <davej@codemonkey.org.uk>
> CC: Steve Douthit <stephend@silicom-usa.com>
> CC: Florian Fainelli <f.fainelli@gmail.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

Other drivers do make use of PHYLIB entirely, and are both a mii_bus
provider and using PHYLIB this driver is just a mii_bus provider,
anyway, probably the best fix for the buck :)

> ---
> v2: fixed up the Kconfig help section to include the clause 22/45
>   address information and also changed the IXGBE_MDIO config option to be
>   dependent upon PHYLIB versus MDIO_BUS since that appears to be the
>   common usage
> 
> v3: Steve Douthit found a much simpler solution of changing the
>   dependency from MDIO_DEVICE to PHYLIB, which is consistent with other
>   Ethernet drivers
> 
>  drivers/net/ethernet/intel/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig
> index 31fb76ee9d82..a1246e89aad4 100644
> --- a/drivers/net/ethernet/intel/Kconfig
> +++ b/drivers/net/ethernet/intel/Kconfig
> @@ -159,7 +159,7 @@ config IXGBE
>  	tristate "Intel(R) 10GbE PCI Express adapters support"
>  	depends on PCI
>  	select MDIO
> -	select MDIO_DEVICE
> +	select PHYLIB
>  	imply PTP_1588_CLOCK
>  	---help---
>  	  This driver supports Intel(R) 10GbE PCI Express family of
>
David Miller Jan. 4, 2019, 9:39 p.m. UTC | #3
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Fri,  4 Jan 2019 10:48:02 -0800

> The new ability added to the driver to use mii_bus to handle MII related
> ioctls is causing compile issues when the driver is compiled into the
> kernel (i.e. not a module).
> 
> The problem was in selecting MDIO_DEVICE instead of the preferred PHYLIB
> Kconfig option.  The reason being that MDIO_DEVICE had a dependency on
> PHYLIB and would be compiled as a module when PHYLIB was a module, no
> matter whether ixgbe was compiled into the kernel.
> 
> CC: Dave Jones <davej@codemonkey.org.uk>
> CC: Steve Douthit <stephend@silicom-usa.com>
> CC: Florian Fainelli <f.fainelli@gmail.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
> v2: fixed up the Kconfig help section to include the clause 22/45
>   address information and also changed the IXGBE_MDIO config option to be
>   dependent upon PHYLIB versus MDIO_BUS since that appears to be the
>   common usage
> 
> v3: Steve Douthit found a much simpler solution of changing the
>   dependency from MDIO_DEVICE to PHYLIB, which is consistent with other
>   Ethernet drivers

Jeff, would you like me to apply this directly?

Thanks.
Kirsher, Jeffrey T Jan. 4, 2019, 9:47 p.m. UTC | #4
On Fri, 2019-01-04 at 13:39 -0800, David Miller wrote:
> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Date: Fri,  4 Jan 2019 10:48:02 -0800
> 
> > The new ability added to the driver to use mii_bus to handle MII
> > related
> > ioctls is causing compile issues when the driver is compiled into
> > the
> > kernel (i.e. not a module).
> > 
> > The problem was in selecting MDIO_DEVICE instead of the preferred
> > PHYLIB
> > Kconfig option.  The reason being that MDIO_DEVICE had a dependency
> > on
> > PHYLIB and would be compiled as a module when PHYLIB was a module,
> > no
> > matter whether ixgbe was compiled into the kernel.
> > 
> > CC: Dave Jones <davej@codemonkey.org.uk>
> > CC: Steve Douthit <stephend@silicom-usa.com>
> > CC: Florian Fainelli <f.fainelli@gmail.com>
> > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> > ---
> > v2: fixed up the Kconfig help section to include the clause 22/45
> >   address information and also changed the IXGBE_MDIO config option
> > to be
> >   dependent upon PHYLIB versus MDIO_BUS since that appears to be
> > the
> >   common usage
> > 
> > v3: Steve Douthit found a much simpler solution of changing the
> >   dependency from MDIO_DEVICE to PHYLIB, which is consistent with
> > other
> >   Ethernet drivers
> 
> Jeff, would you like me to apply this directly?
> 
> Thanks.

Yes, please.  It is the only fix I have for your net tree.
David Miller Jan. 4, 2019, 10:02 p.m. UTC | #5
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Fri, 04 Jan 2019 13:47:09 -0800

> On Fri, 2019-01-04 at 13:39 -0800, David Miller wrote:
>> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date: Fri,  4 Jan 2019 10:48:02 -0800
>> 
>> > The new ability added to the driver to use mii_bus to handle MII
>> > related
>> > ioctls is causing compile issues when the driver is compiled into
>> > the
>> > kernel (i.e. not a module).
>> > 
>> > The problem was in selecting MDIO_DEVICE instead of the preferred
>> > PHYLIB
>> > Kconfig option.  The reason being that MDIO_DEVICE had a dependency
>> > on
>> > PHYLIB and would be compiled as a module when PHYLIB was a module,
>> > no
>> > matter whether ixgbe was compiled into the kernel.
>> > 
>> > CC: Dave Jones <davej@codemonkey.org.uk>
>> > CC: Steve Douthit <stephend@silicom-usa.com>
>> > CC: Florian Fainelli <f.fainelli@gmail.com>
>> > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> > ---
>> > v2: fixed up the Kconfig help section to include the clause 22/45
>> >   address information and also changed the IXGBE_MDIO config option
>> > to be
>> >   dependent upon PHYLIB versus MDIO_BUS since that appears to be
>> > the
>> >   common usage
>> > 
>> > v3: Steve Douthit found a much simpler solution of changing the
>> >   dependency from MDIO_DEVICE to PHYLIB, which is consistent with
>> > other
>> >   Ethernet drivers
>> 
>> Jeff, would you like me to apply this directly?
>> 
>> Thanks.
> 
> Yes, please.  It is the only fix I have for your net tree.

Awesome, done.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig
index 31fb76ee9d82..a1246e89aad4 100644
--- a/drivers/net/ethernet/intel/Kconfig
+++ b/drivers/net/ethernet/intel/Kconfig
@@ -159,7 +159,7 @@  config IXGBE
 	tristate "Intel(R) 10GbE PCI Express adapters support"
 	depends on PCI
 	select MDIO
-	select MDIO_DEVICE
+	select PHYLIB
 	imply PTP_1588_CLOCK
 	---help---
 	  This driver supports Intel(R) 10GbE PCI Express family of