linux/drivers/net/pcs
Daniel Golle 5cc65c01cd net: pcs: mtk-lynxi: check regmap reads in mtk_pcs_lynxi_get_state()
mtk_pcs_lynxi_get_state() ignores regmap_read()'s return value; a
failed read leaves bm and adv holding uninitialized stack values
which are then decoded into the reported link state. The regmaps
backing the MT7531 SGMII PCS instances sit on an MDIO bus where
reads can fail. Check both reads and report the link as down on
error; phylink presets state->link before the callback, so a bare
return would leave a failed read reported as link-up.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/fce70657fc03bbaf60a04c0fbf2f418531135c4f.1785811140.git.daniel@makrotopia.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-07 16:38:46 -07:00
..
Kconfig net: pcs: pcs-mtk-lynxi: deprecate "mediatek,pnswap" 2026-01-21 19:46:59 -08:00
Makefile net: pcs: xpcs: Add Synopsys DW xPCS platform device driver 2024-07-05 09:35:50 +01:00
pcs-lynx.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pcs-mtk-lynxi.c net: pcs: mtk-lynxi: check regmap reads in mtk_pcs_lynxi_get_state() 2026-08-07 16:38:46 -07:00
pcs-rzn1-miic.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
pcs-xpcs-nxp.c net: pcs: xpcs: add _modify() accessors 2024-10-09 12:13:11 +01:00
pcs-xpcs-plat.c driver core: Replace dev->of_node_reused with dev_of_node_reused() 2026-04-26 23:50:20 +02:00
pcs-xpcs-wx.c net: pcs: xpcs: add _modify() accessors 2024-10-09 12:13:11 +01:00
pcs-xpcs.c net: pcs: xpcs: fix SGMII state reading 2026-07-23 08:22:21 -07:00
pcs-xpcs.h net: xpcs: rearrange register definitions 2025-02-17 15:37:27 -08:00