Subject: Re: [RFC PATCH net-next 7/8] net: dsa: mv88e6060: make it a proper PHY driver

From: Guenter Roeck <[email-masked]>
Date: Thu, 30 Apr 2015 06:49:29 -0700

On 04/29/2015 06:57 PM, Florian Fainelli wrote:
> Convert the Marvell 88E6060 switch driver into a proper PHY library
> driver that can be registered. To make sure we do not introduce
> functional changes, the PHY driver provides autoneg and status callbacks
> to make sure the attached Ethernet MAC driver still sees a link UP at
> the CPU port full speed.
>
> Signed-off-by: Florian Fainelli <[email-masked]>
> ---
>   drivers/net/dsa/mv88e6060.c | 114 ++++++++++++++++++++++++++++++++++++++++++--
>   1 file changed, 109 insertions(+), 5 deletions(-)
>

The whole complexity added here makes me wonder if we are really on the right track.
After all, switches are _not_ phy devices. Forcing them to register as phy devices
just because they use mdio and just because the Linux mdio implementation assumes
that anything connected to it is a phy seems odd.

A much better solution might be be to disconnect mdio from phy, ie to create a new
mdio bus framework, as then use this framework for anything connected to an mdio bus.

Does this make any sense, or am I completely off track ?

Thanks,
Guenter