lkml.org 
[lkml]   [2021]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next 2/2] net: phy: at803x: use proper locking in at803x_aneg_done()
On Sun, Feb 14, 2021 at 03:18:49AM +0100, Michael Walle wrote:
> Am 14. Februar 2021 02:57:33 MEZ schrieb Vladimir Oltean <olteanv@gmail.com>:
> >Hi Michael,
> >
> >On Sun, Feb 14, 2021 at 02:04:05AM +0100, Michael Walle wrote:
> >> at803x_aneg_done() checks if auto-negotiation is completed on the
> >SGMII
> >> side. This doesn't take the mdio bus lock and the page switching is
> >> open-coded. Now that we have proper page support, just use
> >> phy_read_paged(). Also use phydev->interface to check if we have an
> >> SGMII link instead of reading the mode register and be a bit more
> >> precise on the warning message.
> >>
> >> Signed-off-by: Michael Walle <michael@walle.cc>
> >> ---
> >
> >How did you test this patch?
>
> I'm afraid it's just compile time tested.

I'm asking because at803x_aneg_done has been dead code for more than 2
years now. Unreachable. And while it was reachable it was buggy and an
abuse of the phylib API. So you might want to just delete this function
instead. Context:
https://lkml.org/lkml/2020/5/30/375

\
 
 \ /
  Last update: 2021-02-14 03:26    [W:0.083 / U:2.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site