Subject: Re: [net-next-2.6 PATCH 2/4] ixgbe: fix driver loading with unsupported module on 82598

From: Ben Hutchings <[email-masked]>
Date: Wed, 27 May 2009 02:28:57 +0100

On Tue, 2009-05-26 at 17:54 -0700, Jeff Kirsher wrote:
> From: Don Skidmore <[email-masked]>
> 
> Driver loads even when an unsupported module inserted.

Why not; they're hot-pluggable.

> This was
> caused by mdio45_probe not returning all the information we needed.
> The fix is to replace that call with the new
> ixgbe_validate_phy_addr().

You could improve mdio45_probe()...

> We will now need to store the phy address which we do in the hw->phy
> struct. Likewise we no longer need the mdio struct in hw->phy along
> with the mdio functions ixgbe_mdio_write(read) which have been
> removed.  ixgbe_ioctl was no longer used and referenced hw->phy.mdio
> so it was also removed.

The ioctl is for the benefit of user-space!

[...]
> diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h
> index ba3ed0f..00c23be 100644
> --- a/drivers/net/ixgbe/ixgbe_type.h
> +++ b/drivers/net/ixgbe/ixgbe_type.h
> @@ -915,6 +915,7 @@
>  #define IXGBE_CORECTL_WRITE_CMD         0x00010000
>  
>  /* MDIO definitions */
> +#define IXGBE_MDIO_PMA_PMD_DEV_TYPE    0x1

This is called MDIO_MMD_PMAPMD.
 
>  #define IXGBE_MDIO_COMMAND_TIMEOUT     100 /* PHY Timeout for 1 GB mode */
>  
> @@ -925,6 +926,8 @@
>  #define IXGBE_MDIO_VENDOR_SPECIFIC_1_10G_SPEED    0x0018
>  #define IXGBE_MDIO_VENDOR_SPECIFIC_1_1G_SPEED     0x0010
>  
> +#define IXGBE_MDIO_PHY_ID_HIGH              0x2    /* PHY ID High Reg */
> +

This is called MDIO_DEVID1.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.