[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E970F4A.3080405@cavium.com>
Date: Thu, 13 Oct 2011 09:18:18 -0700
From: David Daney <david.daney@...ium.com>
To: Andy Fleming <afleming@...escale.com>
CC: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH v3 1/3] phylib: Convert MDIO and PHY Lib drivers to support
10G
On 10/13/2011 07:37 AM, Andy Fleming wrote:
> /**
> + * is_10g_interface - Distinguishes 10G from 10/100/1000
> + * @interface: PHY interface type
> + *
> + * Returns true if the passed interface is capable of 10G,
> + * and therefore indicates the need for Clause-45-style
> + * MDIO transactions.
> + *
> + * For now, XGMII is the only 10G interface
> + */
> +static inline bool is_10g_interface(phy_interface_t interface)
> +{
> + return interface == PHY_INTERFACE_MODE_XGMII;
> +}
> +
The packet interface to the PHY and the protocol used on its MDIO bus
are two separate things. This function conflates them.
Although it is not perfect, my alternate approach:
http://marc.info/?l=linux-netdev&m=131844284003871
Adds a flag bit to struct phy_device that indicates the MDIO bus
protocol to be used. Have you considered doing something like that instead?
David Daney
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists