[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aKbuQ7MCbq1JL9sw@shell.armlinux.org.uk>
Date: Thu, 21 Aug 2025 11:00:35 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Yangfl <mmyangfl@...il.com>
Cc: netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Simon Horman <horms@...nel.org>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [net-next v5 3/3] net: dsa: yt921x: Add support for Motorcomm
YT921x
On Thu, Aug 21, 2025 at 05:25:46PM +0800, Yangfl wrote:
> On Thu, Aug 21, 2025 at 4:30 PM Russell King (Oracle)
> <linux@...linux.org.uk> wrote:
> >
> > On Wed, Aug 20, 2025 at 03:54:16PM +0800, David Yang wrote:
> > > +static int
> > > +yt921x_port_config(struct yt921x_priv *priv, int port, unsigned int mode,
> > > + const struct phylink_link_state *state)
> > > +{
> > > + const struct yt921x_info *info = priv->info;
> > > + struct device *dev = to_device(priv);
> > > + enum yt921x_fixed fixed;
> > > + bool duplex_full;
> > > + u32 mask;
> > > + u32 ctrl;
> > > + int res;
> > > +
> > > + if (state->interface != PHY_INTERFACE_MODE_INTERNAL &&
> > > + !yt921x_info_port_is_external(info, port)) {
> > > + dev_err(dev, "Wrong mode %d on port %d\n",
> > > + state->interface, port);
> > > + return -EINVAL;
> > > + }
> > > +
> > > + fixed = YT921X_FIXED_NOTFIXED;
> > > + ctrl = YT921X_PORT_LINK;
> > > + if (mode == MLO_AN_FIXED)
> > > + switch (state->speed) {
> >
> > Someone clearly doesn't believe in reading the documentation before
> > writing code. This also hasn't been tested in any way. Sorry, but
> > I'm going to put as much effort into this review as you have into
> > understanding the phylink API, and thus my review ends here.
> >
> > NAK.
> >
> > --
> > RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> > FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
>
> Sorry I'm quite new here. I don't understand very clearly why a
> different set of calls is involved in dsa_switch_ops, so I referred to
> other dsa drivers and made a working driver (at least tested on my
> device), but I would appreciate it much if you could point it out in
> an earlier version of series.
This isn't dsa_switch_ops, but phylink_mac_ops, which are well
documented in include/linux/phylink.h. Please read the documentation
found in that header file detailing the phylink_mac_ops methods.
You'll find a brief overview before the struct, and then in the #if 0
section, detailed per-method documentation.
Thanks.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists