From: Andrew Lunn <andrew@lunn.ch>
To: Kyle Switch <kyle.switch@motor-comm.com>
Cc: David Yang <mmyangfl@gmail.com>,
olteanv@gmail.com, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
linux@armlinux.org.uk, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, ming.xu@motor-comm.com,
xiaolin.xu@motor-comm.com, jianmin.wang@motor-comm.com
Subject: Re: [PATCH net-next v1] net:dsa:yt922x: Add support for Motorcomm YT922x
Date: Mon, 17 Aug 2026 15:12:30 +0200 [thread overview]
Message-ID: <944f80c0-5b0b-46ce-8e22-304b683dda60@lunn.ch> (raw)
In-Reply-To: <f324481e-d49c-4d6d-b5fd-8a0296f82a15@motor-comm.com>
On Mon, Aug 17, 2026 at 06:40:02PM +0800, Kyle Switch wrote:
>
> On 8/17/26 05:17, David Yang wrote:
> > On Fri, Aug 14, 2026 at 9:50 AM Kyle Switch <kyle.switch@motor-comm.com> wrote:
> >
> > > @@ -148,10 +148,15 @@ static const struct yt921x_info yt921x_infos[] = {
> > > YT921X_PORT_MASK_INT0_n(8),
> > > YT921X_PORT_MASK_EXT0 | YT921X_PORT_MASK_EXT1,
> > > },
> > > + {
> > > + "YT9224", YT9224_MAJOR, 0, 0,
> > > + 0x1f1,
> > > + 0x0,
> > > + },
> > Why plain magic numbers here, despite what the above entries shows?
> Ans: will fixed done in patch v2.
> >
> > > {}
> > > };
> > >
> > > -#define YT921X_NAME "yt921x"
> > > +#define YT92XX_NAME "yt92xx"
> > This changed the module name which may affect end users. While I have
> > no objection to this, subsystem maintainers may have different
> > opinions.
> Ans: This is used to indicate support for both YT921X and YT922X.
It is pretty common for newer generations of devices to be mostly
backwards compatible, with older generations. The driver does not
change name in Linux it causes too much pointless churn. Please just
get the names correct in the struct phy_driver.
> > > + res = yt921x_intif_read(priv, addr, 0x0, &data);
> > > + if (res)
> > > + return res;
> > > + data |= 1 << 15;
> > > + res = yt921x_intif_write(priv, addr, 0x0, data);
> > > + if (res)
> > > + return res;
> > Numerous magic numbers. On YT9215, same finetunes are not required for
> > a usable port. If you cannot name it, drop it if it is not mandatory.
>
> Ans: Some patches are mandatory
If they are mandatory, why are they needed at all? Why are they not in
the firmware. Seems like a poor hardware/firmware design to me.
> while others are for performance optimization.
For these, it would be good to fully document them, because board
designers might want to optimze them in other ways.
> > > -static void yt921x_mdio_remove(struct mdio_device *mdiodev)
> > > +static void yt92xx_mdio_remove(struct mdio_device *mdiodev)
> > Unnecessary renaming.
And taking this to its logical conclusion...
In a few years time you want to rename to yt9xxx. And a few years
after that, rename to ytxxxx.
Andrew
next prev parent reply other threads:[~2026-08-17 13:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 1:50 [PATCH net-next v1] net:dsa:yt922x: Add support for Motorcomm YT922x Kyle Switch
2026-08-16 21:17 ` David Yang
2026-08-17 10:40 ` Kyle Switch
2026-08-17 13:12 ` Andrew Lunn [this message]
2026-08-20 1:33 ` Kyle Switch
2026-08-17 21:48 ` David Yang
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=944f80c0-5b0b-46ce-8e22-304b683dda60@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jianmin.wang@motor-comm.com \
--cc=kuba@kernel.org \
--cc=kyle.switch@motor-comm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=ming.xu@motor-comm.com \
--cc=mmyangfl@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=xiaolin.xu@motor-comm.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