]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: altera-tse: Warn on bad revision at probe time
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Mon, 3 Nov 2025 10:49:25 +0000 (11:49 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 5 Nov 2025 02:15:15 +0000 (18:15 -0800)
commitdd2619d38d7e97d17995e1156293be1ec08b058d
tree79682c66f05b920d42c02613f57903521fba6b7b
parent6874520518868a660bda182da060b69372265a16
net: altera-tse: Warn on bad revision at probe time

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@lunn.ch>
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20251103104928.58461-3-maxime.chevallier@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/altera/altera_tse.h
drivers/net/ethernet/altera/altera_tse_main.c