From: Andrew Lunn <andrew@lunn.ch>
To: Jose Abreu <jose.abreu@synopsys.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Florian Fainelli <f.fainelli@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Joao Pinto <joao.pinto@synopsys.com>,
Heiner Kallweit <hkallweit1@gmail.com>
Subject: Re: [PATCH net 2/2] net: phy: Use C45 Helpers in PHY_FORCING state
Date: Fri, 1 Mar 2019 14:53:02 +0100 [thread overview]
Message-ID: <20190301135302.GB19813@lunn.ch> (raw)
In-Reply-To: <8480c38d6f3bc5c4f6c332a788bc82999266aab7.1551437561.git.joabreu@synopsys.com>
On Fri, Mar 01, 2019 at 11:54:24AM +0100, Jose Abreu wrote:
> +static inline int phy_update_link(struct phy_device *phydev)
> +{
> + if (!phydev->drv)
> + return -EIO;
> +
> + if (phydev->drv->read_status)
> + return phydev->drv->read_status(phydev);
> + else if (phydev->is_c45)
> + return gen10g_read_status(phydev);
> + else
> + return genphy_update_link(phydev);
> +}
Hi Jose
The asymmetry here could be an issue. We might fall into the trap
that a c45 PHY has the full state in phydev updated, were as a c22
only has the link updated. Somebody testing on C45 might miss a bug
for a C22 device.
Maybe this should be called phy_read_state(), and calls
genphy_read_status() not genphy_update_link().
Andrew
next prev parent reply other threads:[~2019-03-01 13:53 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
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 [this message]
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=20190301135302.GB19813@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--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®