From: Florian Fainelli <f.fainelli@gmail.com>
To: Jose Abreu <jose.abreu@synopsys.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Andrew Lunn <andrew@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Joao Pinto <joao.pinto@synopsys.com>,
Heiner Kallweit <hkallweit1@gmail.com>
Subject: Re: [PATCH net 1/2] net: phy: Use C45 Helpers in phy_read_status()
Date: Fri, 1 Mar 2019 19:14:20 -0800 [thread overview]
Message-ID: <237f5214-c49e-53f9-65f0-479951f62d4a@gmail.com> (raw)
In-Reply-To: <27b3e9f2318c87aac928165b8dfe7d98e272f3d1.1551437561.git.joabreu@synopsys.com>
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@synopsys.com>
> Cc: Andrew Lunn <andrew@lunn.ch>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Joao Pinto <joao.pinto@synopsys.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
next prev parent reply other threads:[~2019-03-02 3:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-01 10:54 [PATCH net 0/2] Use C45 Helpers when possible Jose Abreu
2019-03-01 10:54 ` [PATCH net 1/2] net: phy: Use C45 Helpers in phy_read_status() Jose Abreu
2019-03-02 3:14 ` Florian Fainelli [this message]
2019-03-02 14:11 ` Andrew Lunn
2019-03-02 14:52 ` Heiner Kallweit
2019-03-01 10:54 ` [PATCH net 2/2] net: phy: Use C45 Helpers in PHY_FORCING state Jose Abreu
2019-03-01 13:53 ` Andrew Lunn
2019-03-04 15:07 ` Jose Abreu
2019-03-04 15:44 ` Andrew Lunn
2019-03-04 18:10 ` Heiner Kallweit
2019-03-01 13:44 ` [PATCH net 0/2] Use C45 Helpers when possible Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=237f5214-c49e-53f9-65f0-479951f62d4a@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=hkallweit1@gmail.com \
--cc=joao.pinto@synopsys.com \
--cc=jose.abreu@synopsys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®