Article View: linux.kernel.netdev
Article #25996[PATCH net v5 08/10] net: phy: smsc: wait for LAN83C183 power-down recovery
From: Florian Fainelli
Date: Wed, 02 Dec 2026 22:49
Date: Wed, 02 Dec 2026 22:49
115 lines
15613 bytes
15613 bytes
The LAN83C183 uses the generic PHY driver, which returns immediately
after clearing BMCR_PDOWN. Section 1.11 of the datasheet allows 500 ms
before normal operation is restored. Starting the Au1000 MAC before the
MII clocks recover can hang the MTX-1 when reopening its interface.
Add a LAN83C183 driver entry and resume callback. Wait for recovery only
when BMCR_PDOWN was actually cleared, and propagate MDIO errors without
waiting. Resuming an already awake PHY does not incur the delay.
This supplies the PHY recovery delay; it does not by itself fix the
Au1000 MAC/PHY ordering on reopen. The companion patch, "net: au1000:
keep the MAC stopped until the PHY link is ready", resumes the PHY
synchronously before MAC initialization and stops the MAC before PHY
suspend. Both changes are needed to address the MTX-1 reopen hang.
Keep this PHY change first so the recovery delay is available when the
MAC sequencing fix is applied.
The specific PHY driver must be bound before the MAC attaches the PHY.
For a built-in au1000 MAC used during early boot, enable CONFIG_SMSC_PHY=y.
Module configurations must arrange for smsc.ko to be loaded before PHY
attachment. If attachment falls back to genphy, loading smsc.ko later
does not replace that binding and the recovery delay will not run.
MTX-1 validation used CONFIG_MIPS_AU1X00_ENET=y and CONFIG_SMSC_PHY=y;
the boot logs confirmed attachment to the SMSC LAN83C183 driver.
The LAN83C183 and LSI L80227 document the same LSI/SEEQ OUI and model 4,
so this ID match also binds the L80227 and applies the same conservative
500 ms delay when clearing power-down. The entry otherwise uses generic
PHY helpers and does not program SMSC-specific registers. Hardware
validation is limited to the LAN83C183; the L80227 was not tested.
Sashiko AI review identified the dependency, binding prerequisite and
shared PHY ID; OpenAI Codex assisted source and datasheet verification
and revision.
Fixes: be9dad1f9f26 ("net: phy: suspend phydev when going to HALTED")
Link: https://pdf.dzsc.com/LAN/LAN83C183.pdf#page=44
Link: https://datasheet.octopart.com/L80223-LSI-datasheet-11757091.pdf#page=73
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
---
drivers/net/phy/Kconfig | 2 +-
drivers/net/phy/smsc.c | 27 +++++++++++++++++++++++++++
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index 30e9d22c8d1a..10466b2574eb 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -421,7 +421,7 @@ config SMSC_PHY
tristate "SMSC PHYs"
select CRC16
help
- Currently supports the LAN83C185, LAN8187 and LAN8700 PHYs
+ Currently supports the LAN83C183, LAN83C185, LAN8187 and LAN8700 PHYs
config STE10XP
tristate "STMicroelectronics STe10Xp PHYs"
diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
index 48487149c225..c0713017e54b 100644
--- a/drivers/net/phy/smsc.c
+++ b/drivers/net/phy/smsc.c
@@ -13,6 +13,7 @@
*/
#include <linux/clk.h>
+#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mii.h>
@@ -684,8 +685,33 @@ int smsc_phy_probe(struct phy_device *phydev)
}
EXPORT_SYMBOL_GPL(smsc_phy_probe);
+static int lan83c183_resume(struct phy_device *phydev)
+{
+ int ret;
+
+ ret = phy_modify_changed(phydev, MII_BMCR, BMCR_PDOWN, 0);
+ if (ret < 0)
+ return ret;
+
+ /* The PHY needs up to 500 ms to restore operation after power-down. */
+ if (ret)
+ msleep(500);
+
+ return 0;
+}
+
static struct phy_driver smsc_phy_driver[] = {
{
+ /* LSI/SEEQ OUI 00:a0:7d, model 4; shared with L80227. */
+ .phy_id = 0x0016f840,
+ .phy_id_mask = 0xfffffff0,
+ .name = "SMSC LAN83C183",
+
+ .get_features = genphy_read_abilities,
+ .suspend = genphy_suspend,
+ .resume = lan83c183_resume,
+ .set_loopback = genphy_loopback,
+}, {
.phy_id = 0x0007c0a0, /* OUI=0x00800f, Model#=0x0a */
.phy_id_mask = 0xfffffff0,
.name = "SMSC LAN83C185",
@@ -887,6 +913,7 @@ MODULE_AUTHOR("Herbert Valerio Riedel");
MODULE_LICENSE("GPL");
static const struct mdio_device_id __maybe_unused smsc_tbl[] = {
+ { 0x0016f840, 0xfffffff0 },
{ 0x0007c0a0, 0xfffffff0 },
{ 0x0007c0b0, 0xfffffff0 },
{ 0x0007c0c0, 0xfffffff0 },
--
2.53.0
Technical Details
Message-ID:
<20261202224957.3043478-9-f.fainelli@gmail.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376091-linux-kernel-netdev=dewy.ruReferences:
<20261202224957.3043478-1-f.fainelli@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376091-linux-kernel-netdev=dewy.ru
From: f.fainelli@gmail.com (Florian Fainelli)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net v5 08/10] net: phy: smsc: wait for LAN83C183 power-down recovery
Date: Wed, 2 Dec 2026 14:49:55 -0800
Organization: Usenet Network
Message-ID: <20261202224957.3043478-9-f.fainelli@gmail.com>
References: <20261202224957.3043478-1-f.fainelli@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="2080303"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:AUo+d9Qqd/gABFzsoEOk/vDv4gE= sha256:n6cLJUEJxqsDJa8COWJ9PhVdNzL47O1sC+RAB2XiiR4=
sha1:H5/dPbxv8Za7dcBfKk0QNwXAhps= sha256:e8TQDzBATvEYxKSny59CX7l1FhkU0GL1IM7pDlARafI=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 1DE51117767; Thu, 3 Dec 2026 01:51:02 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.148
X-Spam-Status: No, score=-3.148 tagged_above=-9999 required=6.31
tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001,
HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id Ep8KgL5DeQic;
Thu, 3 Dec 2026 01:50:58 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-376091-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
by mail.dewy.ru (Postfix) with ESMTPS id BD3FD117765; Thu, 3 Dec 2026 01:50:50 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sto.lore.kernel.org (Postfix) with ESMTP id 55B2C602D06; Wed, 2 Dec 2026 22:50:50 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1796251820;
b=w9txs7drW7rTZDY1lXAAJllZmw1oNDXY0THxucvyTs29h/ADHhpZTf139MDxC3wbN0JY
f8nSgUPBeLVrhfMapL/3W5WJC10EqtnpvtXIJr7eZdYrFQLpCbCyA0br/rn8rM1+Gi7N5
IGipzZZ8Xr0HaejCwMvOpcfyOfjGBudOJ/NZIcuDtojRtyoOXRFVg/ILQiCbgJikgN432
2qQ3lKxjydJ76TFPTmhWn+T73ucsg0+6bdFzUfrzTtqy4WqMstjMLPPJbb4EFe4Wug5YW
OORYP6L66/dsyLi0E39di281M+M8Y1PieSlldGVIVJZ9jWHMdD7D0CEy1W5heIyProA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796251820;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:
References:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version:
Content-Transfer-Encoding;
bh=cs5lZ9I1zC2CwBKi1LsdbXy4tNHI/eN5Fq0QKXMdH6s=;
b=NgaHlkojNDnG/6KKszBS4fgWIHpDBJgs7Fk2+6c49ilplildREyQI7wS1Z5x6dNJRCWn
XZLTHgrEc7I1gVYMyoMm1Ofmog5xCfg1Vnv4uv8z6QWBogfGKuBZeD/32kzjvkcZV1l90
Bzx+Kt4Y58hoaqyt9opPGjWgsVzCMrB1vdTY42nV7GN0lsr15Y4zh4SNDSTzIzdV2Tv6C
J4vBj6bvKAaIi+866p/leKCrAUSo7u6mt3KKy553/Kgm5OQ+dURmVkOqmbKZ9xYRje+Rx
7aArJOIWjqXHgDCrHSXTHU1dRVQbjaZYSEouJXJSECuEO/wC0E+ZIgYJz8vCJINJW7w==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=J30r0pJt;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 5489560A5BC0;
Wed, 2 Dec 2026 22:50:20 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=J30r0pJt
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.52
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1796251819;
b=vQeS4gr5yW+6jN+aORdYPNwEZOKRcBxlQHheCXbJvgXO4XfQ84XnOvZ9OWTM4O8uPp72
LCQanKitXuu0nnHB6dw4lJ0sEcyr4vDsiCKoXTdfdbgz9mP6YDNdDOM50kb1jE0OyrFi0
hXHGr7CHFUlf7RJs7H9HGlNi1E/hcQO/44+XwrOduEj3uV5RHGW1oD3764grQY6QcwJQQ
RNjFfq2rPwvM6bEOVfayIxF//Z5OfVdRiACjr8BdYGpdB7p6LYd+P8S4SIHvCT5g0Y3z2
AnTufHRU7EEwWnwXj/F+6myuu37o2hH+25JUetckP6vy6YsDxZAWAPJvv5V+KLCzeMg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796251819;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:
Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version:
Content-Transfer-Encoding;
bh=cs5lZ9I1zC2CwBKi1LsdbXy4tNHI/eN5Fq0QKXMdH6s=;
b=e55f9FbFOwstczBMTtAvZjJAjVM6bewV04HIz7G+JXEysc+Ya0xm+Odw+HzC6szGkjyb
f2NIfMwXY3IX+TYDJXOAD1ERPXDnZK7jZd6HyFWzT8ib0IIpZn6LJVS2IWOpu7kRYzx99
L+/mC84SvQ/Zc18zXdmJ/ITn6d9t9hfKbaakddgqrE+0UUxoS1CHXKtpYm3eshytjeUpC
Oo/UKLCHfuF6MfRCgDxQkNTIG9R3oskXsmb7PZMvEwvTQz8IYmy3T8CHlZeaaZAKn6F7h
rTZUZ/JsLC6orDoRxsQ5Rf2po2FV/rWlhXjqsUXrRVEoRvsZ9rPt1o8Z2kF58p4ZRRA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=J30r0pJt;
arc=none smtp.remote-ip=74.125.82.52
X-Received: from mail-dl1-f52.google.com (mail-dl1-f52.google.com [74.125.82.52])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1C01C606A6AB
for <netdev@vger.kernel.org>; Wed, 2 Dec 2026 22:50:18 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1C01C606A6AB
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-dl1-f52.google.com with SMTP id a92af1059eb24-1b5b93bdc2dso5560922c88.0
for <netdev@vger.kernel.org>; Wed, 02 Dec 2026 14:50:18 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1796251818; x=1796856618; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=cs5lZ9I1zC2CwBKi1LsdbXy4tNHI/eN5Fq0QKXMdH6s=;
b=J30r0pJt0aZljDyt2TnpINlo8eW+Sxjx5r6EC3le8j3a5mwYnPDna3tXT36dRrMl3b
SEeDvLMeBCodYhlfDuRcmGD/qPbvE94dPiYZBPbvoJovToBCPCd8JGaN8mBPpA95SnJt
Q351BkJaMr4tSF68jNxL6VBssSaRdwxOVXH6wlzxgNavi9AG7IaAxg/m5OY4a8GSHXZp
fejPLf0KzqnBbvZG8ihFzLv7LQJ0MYOYsm68Io9ypZzhNDOWMxMfvcO/QV3UM7oop32L
mm5VmPVU7UUtPozDQL24FN+vAwysNCARU1zxPHhnsV3DVcrNBp8H1W3XuYYrzcnqBaBa
ydZQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1796251818; x=1796856618;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from
:to:cc:subject:date:message-id:reply-to:content-type;
bh=cs5lZ9I1zC2CwBKi1LsdbXy4tNHI/eN5Fq0QKXMdH6s=;
b=xvlyZJhvHjMlLQkN6Onirh0Xr06pkp76saexQ2zLBY87E7qfukjnXR3byFhik+MJOI
oQgq95AGfX8S3JTkfg1Wzzomx0TWt9sS0WMH4dHTG8RV1pEz/IRbcU5xHhXByChJDSP1
40YH1FBDF4AYhbsVv7fhg43olwDTUJkOfbQT4+4aL7XDOP8fRYhVsfQUomaw32v70KvP
hLNsST49KYud9901y01gR1rqKlflC5JHzUkQA6OSX+HwkvlNWEVnRWx9aFwTvvVp0/Zf
OiMF0FrsWWcvN4Hwg09NJHRjuF2bom/JCH7dbuQcMa13zftX3c755BxfxhQYXpaNEkZN
pt9w==
X-Gm-Message-State: APuU4Z+ySrbeyCuYDerDwouCfrDJoMi4FmbqYjQxFweQdEJ7VXTKFZUf
KKqJKKxQnGDtv9IJ5s0oXQfOU/qGJhl462gE/1tnnLgWrzFjPwg4rN34f/TT3A==
X-Gm-Gg: AZFdTZdRrHbbzj8TFceZ3jZ9NaAMKRIEAaE7BCm88YE2Woc5pMrLqpQTtU4CVtwFPhb
+K2BI6ZDye6Mahc7OGHhoKEWv1eY1Ju0OidsbN03DcMIBBC32k7AgvVk7zMimBXkFZKjvorT7sA
6Y4ex18UTvsxj4/4grOasGd3VKoCSGVyMt97sJSo918wmrfcg9vfKwQ7hF6KkDx3FwHdxJKCyCg
lCHRV1/h9T69iCGOAVgKl3NAQtSabf6AG2XaVnVIZMKDZItfW/S5bzX7J3fi1pec9zzB9OFJqGf
HMKEAp2yI6icp6I72gofaJwfhndMHE8CUz8H4Mb/02jfSf9gXtxS2Z5TbaZJ/kgfwZ7RARtYf2C
kU0NCOcKIut9x222+WB2yT7ApyF3s6yAmUqx8sNFJAv9X03QRUsIOAjeKtkVS7Ib2e7fchS17hB
SaN5n4GVhEy8dMRBjBnoJN1eOkoSw9hkl7QRNQTZ5acoSX4VAT+AQ5Y3zzeT+MhJqWtvGdeSiAj
IazjU0pxVTpfoxKGAH+kVDwWbxgXVIyvSNFJJ3tWiVw/uIXrmFd9SGL3Fvw2eiXxyIdnkKsqFV1
nDOHAQNLdZOtpmrRn/kdKFlgMuga
X-Received: by 2002:a05:701b:21cd:b0:1b2:4871:b1f7 with SMTP id a92af1059eb24-1b5568fbfcbmr35649115c88.39.1796251818237;
Wed, 02 Dec 2026 14:50:18 -0800 (PST)
X-Received: from eldorado ([2600:8802:b00:1f88:d294:66ff:fe95:a98e])
by smtp.gmail.com with ESMTPSA id a92af1059eb24-1b55684c85fsm151770048c88.14.2026.12.02.14.50.16
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 02 Dec 2026 14:50:17 -0800 (PST)
X-Cc: Florian Fainelli <f.fainelli@gmail.com>,
Simon Horman <horms@kernel.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
Jijie Shao <shaojijie@huawei.com>,
Runyu Xiao <runyu.xiao@seu.edu.cn>,
David Yang <mmyangfl@gmail.com>,
Herbert Valerio Riedel <hvr@gnu.org>,
Danny Kukawka <danny.kukawka@bisect.de>,
Mugunthan V N <mugunthanvnm@ti.com>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
linux-kernel@vger.kernel.org (open list),
Manuel Lauss <manuel.lauss@gmail.com>
X-Mailer: git-send-email 2.53.0
X-In-Reply-To: <20261202224957.3043478-1-f.fainelli@gmail.com>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list