]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: phy: smsc: Force predictable MDI-X state on LAN87xx
authorOleksij Rempel <o.rempel@pengutronix.de>
Thu, 3 Jul 2025 11:49:40 +0000 (13:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jul 2025 16:35:10 +0000 (18:35 +0200)
commit0a0d040f12fe7a75f0dcc26d9c45aebd3d0d3b4c
tree2b6576dadd954e98f3178e8789eb0eaec29b28a0
parent72c62b4991a2e6048e1cfefd1fb33e7c5d8ebd11
net: phy: smsc: Force predictable MDI-X state on LAN87xx

[ Upstream commit 0713e55533c88a20edb53eea6517dc56786a0078 ]

Override the hardware strap configuration for MDI-X mode to ensure a
predictable initial state for the driver. The initial mode of the LAN87xx
PHY is determined by the AUTOMDIX_EN strap pin, but the driver has no
documented way to read its latched status.

This unpredictability means the driver cannot know if the PHY has
initialized with Auto-MDIX enabled or disabled, preventing it from
providing a reliable interface to the user.

This patch introduces a `config_init` hook that forces the PHY into a
known state by explicitly enabling Auto-MDIX.

Fixes: 05b35e7eb9a1 ("smsc95xx: add phylib support")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Andre Edich <andre.edich@microchip.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20250703114941.3243890-3-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/phy/smsc.c