From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "Andrew Lunn" <andrew+netdev@lunn.ch>,
davem@davemloft.net, "Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Russell King" <linux@armlinux.org.uk>,
"Simon Horman" <horms@kernel.org>,
"Boon Khai Ng" <boon.khai.ng@altera.com>,
"Alexis Lothoré" <alexis.lothore@bootlin.com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 2/4] net: altera-tse: Read core revision before registering netdev
Date: Fri, 31 Oct 2025 17:32:49 +0100 [thread overview]
Message-ID: <08518010-3997-4e11-b17e-94765e9c1ca9@bootlin.com> (raw)
In-Reply-To: <b72e0572-6000-478a-b125-93f079944ace@lunn.ch>
Hi Andrew,
On 31/10/2025 17:15, Andrew Lunn wrote:
> On Thu, Oct 30, 2025 at 11:24:15AM +0100, Maxime Chevallier wrote:
>> The core revision is used in .ndo_open(), so we have to populate it
>> before regstering the netdev.
>
> All that open does is:
>
> if ((priv->revision < 0xd00) || (priv->revision > 0xe00))
> netdev_warn(dev, "TSE revision %x\n", priv->revision);
>
> So i agree this does not need a Fixes: tag.
>
> But i do wounder why this is in open. The revision has already been
> printed once in probe. Are values < 0xd00 or > 0xe00 significant? Is
> this left over code and some actions that were previously here are now
> gone?
>
> Maybe a better fix is to remove this, and make revision local in
> probe?
You are correct. I was focusing on leaving the existing behaviour
untouched so I didn't dig any further, but now that you point this
out, we can definitely simplify that.
The revision is read from the priv->megacore_revsion address, and
stored into priv->revision.
The only other spot where this could have been useful is in
altera_tse_ethtool.c, .tse_get_drvinfo(), but here we actually
re-read the version from the registers...
So indeed we can keep that local to probe, print a warning for
unexpected version, and just drop priv->revision :)
Thanks, I'll respin with this.
Maxime
> Andrew
next prev parent reply other threads:[~2025-10-31 16:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-30 10:24 [PATCH net-next 0/4] net: altera-tse: Cleanup init sequence Maxime Chevallier
2025-10-30 10:24 ` [PATCH net-next 1/4] net: altera-tse: Set platform drvdata before registering netdev Maxime Chevallier
2025-10-31 16:08 ` Andrew Lunn
2025-10-30 10:24 ` [PATCH net-next 2/4] net: altera-tse: Read core revision " Maxime Chevallier
2025-10-31 16:15 ` Andrew Lunn
2025-10-31 16:32 ` Maxime Chevallier [this message]
2025-10-30 10:24 ` [PATCH net-next 3/4] net: altera-tse: Don't use netdev name for the PCS mdio bus Maxime Chevallier
2025-10-31 16:17 ` Andrew Lunn
2025-10-30 10:24 ` [PATCH net-next 4/4] net: altera-tse: Init PCS and phylink before registering netdev Maxime Chevallier
2025-10-31 16:19 ` 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=08518010-3997-4e11-b17e-94765e9c1ca9@bootlin.com \
--to=maxime.chevallier@bootlin.com \
--cc=alexis.lothore@bootlin.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=boon.khai.ng@altera.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=thomas.petazzoni@bootlin.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®