From: Andrew Lunn <andrew@lunn.ch>
To: "Bjørn Mork" <bjorn@mork.no>
Cc: netdev@vger.kernel.org, "Lucien.Jheng" <lucienzx159@gmail.com>,
Daniel Golle <daniel@makrotopia.org>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2 1/3] net: phy: air_en8811h: factor out shareable code
Date: Sat, 24 Jan 2026 19:38:53 +0100 [thread overview]
Message-ID: <af7daf2e-7a8a-4a83-902a-28c9375daea3@lunn.ch> (raw)
In-Reply-To: <87a4y3j6hi.fsf@miraculix.mork.no>
On Sat, Jan 24, 2026 at 05:55:05PM +0100, Bjørn Mork wrote:
> Andrew Lunn <andrew@lunn.ch> writes:
>
> >> -static int en8811h_read_status(struct phy_device *phydev)
> >> +static int en8811h_get_lpa(struct phy_device *phydev)
> >> {
> >> - struct en8811h_priv *priv = phydev->priv;
> >> - u32 pbus_value;
> >> - int ret, val;
> >> + int ret;
> >>
> >> ret = genphy_update_link(phydev);
> >> if (ret)
> >
> > This call to genphy_update_link() means this function is doing more
> > than en8811h_get_lpa() would imply.
> >
> > It is hard to see from just the patch, but it also seems to set the
> > state in phydev back to unknown defaults, and read the master/slave
> > status?
> >
> > So i think it needs a better name.
>
> Yes, that was my feeling too. Just couldn't think of any. So I took the
> lazy route. You wouldn't happen to have a suggestion?
Maybe a different strategy. Most of read_status is generic, it appears
just reading lpa is specific to the device. So have a generic
read_status() function, and then use phy_id_compare() to call the
needed device specific function.
Andrew
next prev parent reply other threads:[~2026-01-24 18:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-23 7:58 [PATCH net-next v2 0/3] Airoha AN8811HB 2.5 Gbps phy support Bjørn Mork
2026-01-23 7:58 ` [PATCH net-next v2 1/3] net: phy: air_en8811h: factor out shareable code Bjørn Mork
2026-01-23 22:50 ` Andrew Lunn
2026-01-24 16:55 ` Bjørn Mork
2026-01-24 18:38 ` Andrew Lunn [this message]
2026-01-25 10:51 ` Bjørn Mork
2026-01-25 16:23 ` Andrew Lunn
2026-01-23 7:58 ` [PATCH net-next v2 2/3] net: phy: air_en8811h: add Airoha AN8811HB support Bjørn Mork
2026-01-23 23:01 ` Andrew Lunn
2026-01-24 16:53 ` Bjørn Mork
2026-01-24 18:33 ` Andrew Lunn
2026-01-25 11:07 ` Bjørn Mork
2026-01-23 7:58 ` [PATCH net-next v2 3/3] net: phy: air_en8811h: Add clk provider for an8811hb Bjørn Mork
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=af7daf2e-7a8a-4a83-902a-28c9375daea3@lunn.ch \
--to=andrew@lunn.ch \
--cc=bjorn@mork.no \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lucienzx159@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vladimir.oltean@nxp.com \
/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®