* Re: [PATCH net-next v2] net: phy: broadcom: add 1000Base-X support for BCM54616S [not found] <20190801235839.290689-1-taoren@fb.com> @ 2019-08-02 14:50 ` Andrew Lunn 2019-08-02 19:52 ` Tao Ren 0 siblings, 1 reply; 2+ messages in thread From: Andrew Lunn @ 2019-08-02 14:50 UTC (permalink / raw) To: Tao Ren Cc: Florian Fainelli, Heiner Kallweit, David S . Miller, Arun Parameswaran, Justin Chen, Vladimir Oltean, netdev, linux-kernel, openbmc > +static int bcm54616s_read_status(struct phy_device *phydev) > +{ > + int err; > + > + err = genphy_read_status(phydev); > + > + /* 1000Base-X register set doesn't provide speed fields: the > + * link speed is always 1000 Mb/s as long as link is up. > + */ > + if (phydev->dev_flags & PHY_BCM_FLAGS_MODE_1000BX && > + phydev->link) > + phydev->speed = SPEED_1000; > + > + return err; > +} This function is equivalent to bcm5482_read_status(). You should use it, rather than add a new function. Andrew ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH net-next v2] net: phy: broadcom: add 1000Base-X support for BCM54616S 2019-08-02 14:50 ` [PATCH net-next v2] net: phy: broadcom: add 1000Base-X support for BCM54616S Andrew Lunn @ 2019-08-02 19:52 ` Tao Ren 0 siblings, 0 replies; 2+ messages in thread From: Tao Ren @ 2019-08-02 19:52 UTC (permalink / raw) To: Andrew Lunn Cc: Florian Fainelli, Heiner Kallweit, David S . Miller, Arun Parameswaran, Justin Chen, Vladimir Oltean, netdev@vger•kernel.org, linux-kernel@vger•kernel.org, openbmc@lists•ozlabs.org On 8/2/19 7:50 AM, Andrew Lunn wrote: >> +static int bcm54616s_read_status(struct phy_device *phydev) >> +{ >> + int err; >> + >> + err = genphy_read_status(phydev); >> + >> + /* 1000Base-X register set doesn't provide speed fields: the >> + * link speed is always 1000 Mb/s as long as link is up. >> + */ >> + if (phydev->dev_flags & PHY_BCM_FLAGS_MODE_1000BX && >> + phydev->link) >> + phydev->speed = SPEED_1000; >> + >> + return err; >> +} > > This function is equivalent to bcm5482_read_status(). You should use > it, rather than add a new function. Thank you for pointing it out. Will fix the code. BTW, should I update the patch subject to something more descriptive (such as "net: phy: broadcom: fix BCM54616S read_status in 1000X mode")? Or I should use the same title to avoid confusion? Thanks, Tao ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-08-02 19:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20190801235839.290689-1-taoren@fb.com>
2019-08-02 14:50 ` [PATCH net-next v2] net: phy: broadcom: add 1000Base-X support for BCM54616S Andrew Lunn
2019-08-02 19:52 ` Tao Ren
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox