netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yangfl <mmyangfl@gmail.com>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
	 Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	 Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	 Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	 Simon Horman <horms@kernel.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [net-next v5 3/3] net: dsa: yt921x: Add support for Motorcomm YT921x
Date: Thu, 21 Aug 2025 17:25:46 +0800	[thread overview]
Message-ID: <CAAXyoMMGCRZTuhYG0zxTgKdDdgB1brU7BAUiCVR_MheFK-n5Yw@mail.gmail.com> (raw)
In-Reply-To: <aKbZM6oYhIN6cBQb@shell.armlinux.org.uk>

On Thu, Aug 21, 2025 at 4:30 PM Russell King (Oracle)
<linux@armlinux.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.

Sorry for any disturbance.

  reply	other threads:[~2025-08-21  9:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-20  7:54 [net-next v5 0/3] net: dsa: yt921x: Add support for Motorcomm YT921x David Yang
2025-08-20  7:54 ` [net-next v5 1/3] dt-bindings: net: dsa: yt921x: Add Motorcomm YT921x switch support David Yang
2025-08-21  7:22   ` Krzysztof Kozlowski
2025-08-21 12:20   ` Andrew Lunn
2025-08-21 12:50     ` Yangfl
2025-08-21 13:42       ` Andrew Lunn
2025-08-20  7:54 ` [net-next v5 2/3] net: dsa: tag_yt921x: add support for Motorcomm YT921x tags David Yang
2025-08-21 12:23   ` Andrew Lunn
2025-08-20  7:54 ` [net-next v5 3/3] net: dsa: yt921x: Add support for Motorcomm YT921x David Yang
2025-08-21  8:30   ` Russell King (Oracle)
2025-08-21  9:25     ` Yangfl [this message]
2025-08-21 10:00       ` Russell King (Oracle)
2025-08-21 10:14         ` Russell King (Oracle)
2025-08-21 12:19           ` Yangfl
2025-08-21 12:41   ` 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=CAAXyoMMGCRZTuhYG0zxTgKdDdgB1brU7BAUiCVR_MheFK-n5Yw@mail.gmail.com \
    --to=mmyangfl@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=robh@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;
as well as URLs for NNTP newsgroup(s).