From nobody Wed Oct 8 06:58:27 2025 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2FF0D273D89 for ; Tue, 1 Jul 2025 12:22:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751372522; cv=none; b=rYQWauPxlnXjK6bmtcnk+JO5u+J8YkEcFNQfwRMusplfsh6PsqNhR+glghgUpCRk3Md34+aAxCy5WLEYZlbSqPhYWK3WrSJUyns7MdNn6MdEQhz38EmRgXlAK3jpzDmSKAnU6LMFNI1UH0leLsH1tLJK9n2t/IpY5K3haCz5EoY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751372522; c=relaxed/simple; bh=T1eznURLjuD0Abxq1edZummHu16xKukTlKv1spW65/Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=m4arQcbLqFj4fnig5AKOqnmDWxkNtf3E6tKyZQud7cyZfuqPDLYoCJFgIDCJRvWHobJkaeuKbHyRDcG9xdD/IsIg/dXodXPyL6JPbuzQ6oCtEFTJscgTq4ZRywNSou2rblj+xxBKduqI8uNjtPQ3qYTTh3+yqzmbvMVonPvhqjU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1uWZzh-0007K1-6Z; Tue, 01 Jul 2025 14:21:49 +0200 Received: from dude04.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::ac]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uWZzf-006GdE-2D; Tue, 01 Jul 2025 14:21:47 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1uWZzf-0009GS-1y; Tue, 01 Jul 2025 14:21:47 +0200 From: Oleksij Rempel To: Andrew Lunn , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Oleksij Rempel , Andre Edich , kernel@pengutronix.de, linux-kernel@vger.kernel.org, Russell King , netdev@vger.kernel.org, Lukas Wunner Subject: [PATCH net v1 1/4] net: phy: smsc: Fix Auto-MDIX configuration when disabled by strap Date: Tue, 1 Jul 2025 14:21:43 +0200 Message-Id: <20250701122146.35579-2-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250701122146.35579-1-o.rempel@pengutronix.de> References: <20250701122146.35579-1-o.rempel@pengutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Correct the Auto-MDIX configuration to ensure userspace settings are respected when the feature is disabled by the AUTOMDIX_EN hardware strap. The LAN9500 PHY allows its default MDI-X mode to be configured via a hardware strap. If this strap sets the default to "MDI-X off", the driver was previously unable to enable Auto-MDIX from userspace. When handling the ETH_TP_MDI_AUTO case, the driver would set the SPECIAL_CTRL_STS_AMDIX_ENABLE_ bit but neglected to set the required SPECIAL_CTRL_STS_OVRRD_AMDIX_ bit. Without the override flag, the PHY falls back to its hardware strap default, ignoring the software request. This patch corrects the behavior by also setting the override bit when enabling Auto-MDIX. This ensures that the userspace configuration takes precedence over the hardware strap, allowing Auto-MDIX to be enabled correctly in all scenarios. Fixes: 05b35e7eb9a1 ("smsc95xx: add phylib support") Signed-off-by: Oleksij Rempel Cc: Andre Edich --- drivers/net/phy/smsc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c index 31463b9e5697..adf12d7108b5 100644 --- a/drivers/net/phy/smsc.c +++ b/drivers/net/phy/smsc.c @@ -167,7 +167,8 @@ static int lan87xx_config_aneg(struct phy_device *phyde= v) SPECIAL_CTRL_STS_AMDIX_STATE_; break; case ETH_TP_MDI_AUTO: - val =3D SPECIAL_CTRL_STS_AMDIX_ENABLE_; + val =3D SPECIAL_CTRL_STS_OVRRD_AMDIX_ | + SPECIAL_CTRL_STS_AMDIX_ENABLE_; break; default: return genphy_config_aneg(phydev); --=20 2.39.5 From nobody Wed Oct 8 06:58:27 2025 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EEAE81EE033 for ; Tue, 1 Jul 2025 12:21:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751372521; cv=none; b=nXqsM7qUqlbV17r5b7ai6UfmFwtRd4eoyAnqK2uZxaU73CNkfSr0iDbeKUNm1khkiLGQv1hdT7I6p50d2IY20ddqoVOW9EHw28goWmGcYtJTJZDraKXqClr9PQUTkLHh8homEYB+b7INwsSRGAK3X6L9zJp6vL0vR+5E2/Uy1B4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751372521; c=relaxed/simple; bh=h5sT7K0qujjGAxa1ljOQ5qCQmP+3h2L0erhsAYhuP9A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=JIkLjOFbkLz/QmDfhA7bV5W53hzYYTcYoi2C6BjHVBrwlR1QR3K4fXLHSpaNf3+izegHWqmf6qxZcoHxdKkj2DlIx3r9c29gKigcCJ4D+ADKu1wOi1cbXz7y22G2Ew+Qy0ghX/MRS5oVIQj6s4Ut2oA+SD51c6oTAX991zfr8Cc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1uWZzh-0007K2-6Z; Tue, 01 Jul 2025 14:21:49 +0200 Received: from dude04.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::ac]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uWZzf-006GdF-2J; Tue, 01 Jul 2025 14:21:47 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1uWZzf-0009Gc-24; Tue, 01 Jul 2025 14:21:47 +0200 From: Oleksij Rempel To: Andrew Lunn , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Oleksij Rempel , Andre Edich , kernel@pengutronix.de, linux-kernel@vger.kernel.org, Russell King , netdev@vger.kernel.org, Lukas Wunner Subject: [PATCH net v1 2/4] net: phy: smsc: Force predictable MDI-X state on LAN87xx Date: Tue, 1 Jul 2025 14:21:44 +0200 Message-Id: <20250701122146.35579-3-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250701122146.35579-1-o.rempel@pengutronix.de> References: <20250701122146.35579-1-o.rempel@pengutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Cc: Andre Edich --- drivers/net/phy/smsc.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c index adf12d7108b5..ad9a3d91bb8a 100644 --- a/drivers/net/phy/smsc.c +++ b/drivers/net/phy/smsc.c @@ -262,6 +262,33 @@ int lan87xx_read_status(struct phy_device *phydev) } EXPORT_SYMBOL_GPL(lan87xx_read_status); =20 +static int lan87xx_phy_config_init(struct phy_device *phydev) +{ + int rc; + + /* The LAN87xx PHY's initial MDI-X mode is determined by the AUTOMDIX_EN + * hardware strap, but the driver cannot read the strap's status. This + * creates an unpredictable initial state. + * + * To ensure consistent and reliable behavior across all boards, + * override the strap configuration on initialization and force the PHY + * into a known state with Auto-MDIX enabled, which is the expected + * default for modern hardware. + */ + rc =3D phy_modify(phydev, SPECIAL_CTRL_STS, + SPECIAL_CTRL_STS_OVRRD_AMDIX_ | + SPECIAL_CTRL_STS_AMDIX_ENABLE_ | + SPECIAL_CTRL_STS_AMDIX_STATE_, + SPECIAL_CTRL_STS_OVRRD_AMDIX_ | + SPECIAL_CTRL_STS_AMDIX_ENABLE_); + if (rc < 0) + return rc; + + phydev->mdix_ctrl =3D ETH_TP_MDI_AUTO; + + return smsc_phy_config_init(phydev); +} + static int lan874x_phy_config_init(struct phy_device *phydev) { u16 val; @@ -696,7 +723,7 @@ static struct phy_driver smsc_phy_driver[] =3D { =20 /* basic functions */ .read_status =3D lan87xx_read_status, - .config_init =3D smsc_phy_config_init, + .config_init =3D lan87xx_phy_config_init, .soft_reset =3D smsc_phy_reset, .config_aneg =3D lan87xx_config_aneg, =20 --=20 2.39.5 From nobody Wed Oct 8 06:58:27 2025 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92C34270EDD for ; Tue, 1 Jul 2025 12:21:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751372521; cv=none; b=g0djaKp9SMuNwmG6muYPVgIKNPQNKZdJVxKfR8rqUVUejNdx037icvzZKRLBAg91yWjV6REdE08n0ab/3cJ5jYGN9qw/LrSdcKWTh0fO3pl0XZN7tKCKjtGeYcxEpYm6IXwLyVwcw6GdxGTl7N3hqkihoWDi7NTmW1Co8nRgysI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751372521; c=relaxed/simple; bh=2ndnXT/jdRZiwHSO45PZ1vhtye3DENczMp0fuqzlwn0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=u453NyklaSNv15BwR87Ls0G2tgburNMlxv6KnySZSOKEAQK+7rllXM3GOrzU/mB+7Q/DEoY9RGrVJovAFuRFElhbMXfY3A70MDrofWxlwtbpUBXp/yUWp3jSdfQE196ki71Qhu9D78Xu3Ilza6nGqGasP1hVKZPouSni7/V+ZPo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1uWZzh-0007K3-6Z; Tue, 01 Jul 2025 14:21:49 +0200 Received: from dude04.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::ac]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uWZzf-006GdG-2O; Tue, 01 Jul 2025 14:21:47 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1uWZzf-0009Gm-28; Tue, 01 Jul 2025 14:21:47 +0200 From: Oleksij Rempel To: Andrew Lunn , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Oleksij Rempel , Andre Edich , kernel@pengutronix.de, linux-kernel@vger.kernel.org, Russell King , netdev@vger.kernel.org, Lukas Wunner Subject: [PATCH net v1 3/4] net: phy: smsc: Fix link failure in forced mode with Auto-MDIX Date: Tue, 1 Jul 2025 14:21:45 +0200 Message-Id: <20250701122146.35579-4-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250701122146.35579-1-o.rempel@pengutronix.de> References: <20250701122146.35579-1-o.rempel@pengutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Force a fixed MDI-X mode when auto-negotiation is disabled to prevent link instability. When forcing the link speed and duplex on a LAN9500 PHY (e.g., with `ethtool -s eth0 autoneg off ...`) while leaving MDI-X control in auto mode, the PHY fails to establish a stable link. This occurs because the PHY's Auto-MDIX algorithm is not designed to operate when auto-negotiation is disabled. In this state, the PHY continuously toggles the TX/RX signal pairs, which prevents the link partner from synchronizing. This patch resolves the issue by detecting when auto-negotiation is disabled. If the MDI-X control mode is set to 'auto', the driver now forces a specific, stable mode (ETH_TP_MDI) to prevent the pair toggling. This choice of a fixed MDI mode mirrors the behavior the hardware would exhibit if the AUTOMDIX_EN strap were configured for a fixed MDI connection. Fixes: 05b35e7eb9a1 ("smsc95xx: add phylib support") Signed-off-by: Oleksij Rempel Cc: Andre Edich --- drivers/net/phy/smsc.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c index ad9a3d91bb8a..b6489da5cfcd 100644 --- a/drivers/net/phy/smsc.c +++ b/drivers/net/phy/smsc.c @@ -155,10 +155,29 @@ static int smsc_phy_reset(struct phy_device *phydev) =20 static int lan87xx_config_aneg(struct phy_device *phydev) { - int rc; + u8 mdix_ctrl; int val; + int rc; + + /* When auto-negotiation is disabled (forced mode), the PHY's + * Auto-MDIX will continue toggling the TX/RX pairs. + * + * To establish a stable link, we must select a fixed MDI mode. + * If the user has not specified a fixed MDI mode (i.e., mdix_ctrl is + * 'auto'), we default to ETH_TP_MDI. This choice of a ETH_TP_MDI mode + * mirrors the behavior the hardware would exhibit if the AUTOMDIX_EN + * strap were configured for a fixed MDI connection. + */ + if (phydev->autoneg =3D=3D AUTONEG_DISABLE) { + if (phydev->mdix_ctrl =3D=3D ETH_TP_MDI_AUTO) + mdix_ctrl =3D ETH_TP_MDI; + else + mdix_ctrl =3D phydev->mdix_ctrl; + } else { + mdix_ctrl =3D phydev->mdix_ctrl; + } =20 - switch (phydev->mdix_ctrl) { + switch (mdix_ctrl) { case ETH_TP_MDI: val =3D SPECIAL_CTRL_STS_OVRRD_AMDIX_; break; @@ -184,7 +203,7 @@ static int lan87xx_config_aneg(struct phy_device *phyde= v) rc |=3D val; phy_write(phydev, SPECIAL_CTRL_STS, rc); =20 - phydev->mdix =3D phydev->mdix_ctrl; + phydev->mdix =3D mdix_ctrl; return genphy_config_aneg(phydev); } =20 --=20 2.39.5 From nobody Wed Oct 8 06:58:27 2025 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C7C401EC006 for ; Tue, 1 Jul 2025 12:21:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751372520; cv=none; b=JQD0k+q8hJQ51ARF0OoYeEQjv60R9e9BsHjHSKkzd5v3eYS4PqkC4eqfpu1z/JsNqctd35KlhGZE7QuXPrtMhnZ7iUR0ijiiD8vwU8CEqpo45EWRRGQkMi/Qc9hpw9XqNuaOmNUrq1mgFI5An5q6n0P7Lho5rEzkWsuX5qXtjCQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751372520; c=relaxed/simple; bh=GVxzOmbuteW1CLn6leGWX8qffFDbE9Jux5PfpkbHWh8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=nTZhcCQDj7dVQoXhkQ1UEJo1hp66k1MOL8j0m2AcqYT1Ep4EtTazSlxu16f4omWurlH+Zgn1/A8lCboGJQbuMKd8Pb0F4q2xtN8cDLOFmwIHGNfkGKOQlFdcSbJEikK9sJRLHuojlCLPVvj1iTBFPfCmtB1fGnMAtmhJRx5ORuU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1uWZzh-0007K4-6O; Tue, 01 Jul 2025 14:21:49 +0200 Received: from dude04.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::ac]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uWZzf-006GdH-2U; Tue, 01 Jul 2025 14:21:47 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1uWZzf-0009Gw-2C; Tue, 01 Jul 2025 14:21:47 +0200 From: Oleksij Rempel To: Andrew Lunn , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Oleksij Rempel , Lukas Wunner , kernel@pengutronix.de, linux-kernel@vger.kernel.org, Russell King , netdev@vger.kernel.org, Andre Edich Subject: [PATCH net v1 4/4] net: phy: smsc: Disable IRQ support to prevent link state corruption Date: Tue, 1 Jul 2025 14:21:46 +0200 Message-Id: <20250701122146.35579-5-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250701122146.35579-1-o.rempel@pengutronix.de> References: <20250701122146.35579-1-o.rempel@pengutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Disable interrupt handling for the LAN87xx PHY to prevent the network interface from entering a corrupted state after rapid configuration changes. When the link configuration is changed quickly, the PHY can get stuck in a non-functional state. In this state, 'ethtool' reports that a link is present, but 'ip link' shows NO-CARRIER, and the interface is unable to transfer data. Fixes: 1ce8b37241ed ("usbnet: smsc95xx: Forward PHY interrupts to PHY drive= r to avoid polling") Signed-off-by: Oleksij Rempel Cc: Lukas Wunner --- drivers/net/phy/smsc.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c index b6489da5cfcd..dac6bf156d15 100644 --- a/drivers/net/phy/smsc.c +++ b/drivers/net/phy/smsc.c @@ -746,10 +746,6 @@ static struct phy_driver smsc_phy_driver[] =3D { .soft_reset =3D smsc_phy_reset, .config_aneg =3D lan87xx_config_aneg, =20 - /* IRQ related */ - .config_intr =3D smsc_phy_config_intr, - .handle_interrupt =3D smsc_phy_handle_interrupt, - /* Statistics */ .get_sset_count =3D smsc_get_sset_count, .get_strings =3D smsc_get_strings, --=20 2.39.5