[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <237f5214-c49e-53f9-65f0-479951f62d4a@gmail.com>
Date: Fri, 1 Mar 2019 19:14:20 -0800
From: Florian Fainelli <f.fainelli@...il.com>
To: Jose Abreu <jose.abreu@...opsys.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Andrew Lunn <andrew@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Joao Pinto <joao.pinto@...opsys.com>,
Heiner Kallweit <hkallweit1@...il.com>
Subject: Re: [PATCH net 1/2] net: phy: Use C45 Helpers in phy_read_status()
On 3/1/2019 2:54 AM, Jose Abreu wrote:
> Currently phy_read_status() considers that either the PHY driver has the
> read_status() callback or uses the generic callback.
>
> For C45 PHYs we need to use the gen10g_read_status() callback.
Right, so we could expect your C45 PHY driver to assign the read_status
callback to gen10g_read_status() if it is appropriate. So far most of
the 10g PHY drivers (cortina, marvell10g, aquantia) have to define their
own read_status() callback to be feature complete. Unlike C22 PHYs that
can really be driven with a simple generic PHY driver model for standard
features, C45 PHYs seem to be quirky enough this does not work anymore.
>
> Signed-off-by: Jose Abreu <joabreu@...opsys.com>
> Cc: Andrew Lunn <andrew@...n.ch>
> Cc: Florian Fainelli <f.fainelli@...il.com>
> Cc: "David S. Miller" <davem@...emloft.net>
> Cc: Joao Pinto <joao.pinto@...opsys.com>
> ---
> include/linux/phy.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/linux/phy.h b/include/linux/phy.h
> index 333b56d8f746..872899136fdc 100644
> --- a/include/linux/phy.h
> +++ b/include/linux/phy.h
> @@ -1030,6 +1030,8 @@ static inline int phy_read_status(struct phy_device *phydev)
>
> if (phydev->drv->read_status)
> return phydev->drv->read_status(phydev);
> + else if (phydev->is_c45)
> + return gen10g_read_status(phydev);
> else
> return genphy_read_status(phydev);
> }
>
--
Florian
Powered by blists - more mailing lists