]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: dsa: mxl-gsw1xx: validate chip ID
authorDaniel Golle <daniel@makrotopia.org>
Sun, 1 Feb 2026 03:42:18 +0000 (03:42 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 10 Feb 2026 08:09:27 +0000 (09:09 +0100)
commita046d6fc54d46168f69cf4d4a35f714594d205b8
tree710b2d9c7ad848c0cde2817d5043a32470ad3c96
parentffd034ac0912bb09c3d8e0fb30f3aedbdc0f25b4
net: dsa: mxl-gsw1xx: validate chip ID

No check for actually present hardware is being performed in the probe
function of the mxl-gsw1xx switch driver. So even if the switch isn't
present at the configured MDIO bus address the driver wrongly tells the
user that a "GSWIP version 0 mod 0" was found, outputting errors about
PHY capabilities not matching.

Read and validate the chip MANU_ID and PNUM_ID registers and output
information while probing, but return an error and abort probing in case
the hardware is not actually present.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Link: https://patch.msgid.link/3194d3d3bb0b51f08755d392e1fdf7bb6dc49608.1769916962.git.daniel@makrotopia.org
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/dsa/lantiq/mxl-gsw1xx.c
drivers/net/dsa/lantiq/mxl-gsw1xx.h