Re: [PATCH net-next v2 2/4] net: altera-tse: Warn on bad revision at probe time
From: Andrew Lunn
Date: Mon Nov 03 2025 - 08:51:06 EST
On Mon, Nov 03, 2025 at 11:49:25AM +0100, Maxime Chevallier wrote:
> Instead of reading the core revision at probe time, and print a warning
> for an unexecpected version at .ndo_open() time, let's print that
> warning directly in .probe().
>
> This allows getting rid of the "revision" private field, and also
> prevent a potential race between reading the revision in .probe() after
> netdev registration, and accessing that revision in .ndo_open().
>
> By printing the warning after register_netdev(), we are sure that we
> have a netdev name, and that we try to print the revision after having
> read it from the internal registers.
>
> Suggested-by: Andrew Lunn <andrew@xxxxxxx>
> Signed-off-by: Maxime Chevallier <maxime.chevallier@xxxxxxxxxxx>
Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
Andrew