Article View: linux.kernel.netdev
Article #18055Re: [PATCH net v2 04/12] net: au1000: report MDIO transaction timeouts
From: Florian Fainelli
Date: Tue, 17 Nov 2026 19:09
Date: Tue, 17 Nov 2026 19:09
70 lines
13817 bytes
13817 bytes
On 11/16/26 05:50, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found more severe
> issue(s) in other patches of this series. This mail is only an FYI, in case
> you want to address the nit picks below when you respin.
>
> Low priority / nit picks for your consideration:
>
> - [Low] The patch adds a second timeout exit to au1000_mdio_write()
> (drivers/net/ethernet/amd/au1000_eth.c), and both exits log the sameβ¦
>
> --
>
> net: au1000: report MDIO transaction timeouts
>
> This commit makes au1000_mdio_write() return -ETIMEDOUT instead of
> reporting success when the MII controller stays busy. It also adds a
> readl_poll_timeout() check after the write so that a failed final
> transaction is reported to phylib. The read path now returns -ETIMEDOUT
> instead of -1.
>
>> diff --git a/drivers/net/ethernet/amd/au1000_eth.c b/drivers/net/ethernet/amd/au1000_eth.c
>> index 7063f9e5bc7c0..6b2e216a83618 100644
>> --- a/drivers/net/ethernet/amd/au1000_eth.c
>> +++ b/drivers/net/ethernet/amd/au1000_eth.c
>
> [ ... ]
>
>> @@ -292,26 +293,27 @@ static int au1000_mdio_read(struct net_device *dev, int phy_addr, int reg)
>
> [ ... ]
>
>> while (readl(mii_control_reg) & MAC_MII_BUSY) {
>> mdelay(1);
>> if (--timedout == 0) {
>> netdev_err(dev, "mdio_write busy timeout!!\n");
>> - return;
>> + return -ETIMEDOUT;
>> }
>> }
>>
>> @@ -320,6 +322,13 @@ static void au1000_mdio_write(struct net_device *dev, int phy_addr,
>>
>> writel(value, mii_data_reg);
>> writel(mii_control, mii_control_reg);
>> +
>> + ret = readl_poll_timeout(mii_control_reg, mii_control,
>> + !(mii_control & MAC_MII_BUSY), 20, 20000);
>> + if (ret)
>> + netdev_err(dev, "mdio_write busy timeout!!\n");
>
> [Severity: Low]
> This isn't a bug, but could this message use different wording from the
> one in the busy wait loop above?
>
> Both timeout paths in au1000_mdio_write() now print "mdio_write busy
> timeout!!". The first one fires before anything is written to the
> registers. The new one fires after writel() has already started the
> transaction, so the PHY register may or may not have been changed. From
> dmesg there is no way to tell which of the two happened.
>
> au1000_mdio_read() already uses two separate messages ("read_MII busy
> timeout!!" and "mdio_read busy timeout!!"). Something like "mdio_write
> completion timeout" here would separate the two write cases the same way.
Sure, that can be improved to be clearer.
pw-bot: cr
--
Florian
Technical Details
Message-ID:
<09116c63-4c6b-440d-914a-e75902dc36ae@gmail.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365544-linux-kernel-netdev=dewy.ruReferences:
<20261112045301.3669532-5-f.fainelli@gmail.com> <179483704272.3136.4869685253432664524@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365544-linux-kernel-netdev=dewy.ru
From: f.fainelli@gmail.com (Florian Fainelli)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v2 04/12] net: au1000: report MDIO transaction
timeouts
Date: Tue, 17 Nov 2026 11:09:33 -0800
Organization: Usenet Network
Message-ID: <09116c63-4c6b-440d-914a-e75902dc36ae@gmail.com>
References: <20261112045301.3669532-5-f.fainelli@gmail.com>
<179483704272.3136.4869685253432664524@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="2406775"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:CXmceo1Tapq3g8ShRjh4DNAxPi4= sha256:b1EfvEBTQHj8AQ41RJrjqcrjxYUkFlIKLi98+L2oEI0=
sha1:+2MGTFVuAfTBv19N7zt62XlSxtY= sha256:QRJvqJwG5Lk4tlFFf1KvQXpSo7tRtjQYeG3vNdCeSo4=
Content-Language: en-US, fr-FR
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 1EE22115040; Tue, 17 Nov 2026 22:10:07 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.149
X-Spam-Status: No, score=-3.149 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]
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 msoq82vyMFC8;
Tue, 17 Nov 2026 22:09:56 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-365544-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
by mail.dewy.ru (Postfix) with ESMTPS id E7C8A115029; Tue, 17 Nov 2026 22:09:46 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by tor.lore.kernel.org (Postfix) with ESMTP id 1E64F45815; Tue, 17 Nov 2026 19:09:43 +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=1794942581;
b=jWbJScH9Ul4LJEw798tFWnVAjOsVh+l6jZWYKeKwOqAr1RKVoz3v/eVyjCrs83J26Tir
crG3uVbG2ppI8coxz2BNfl0evfZIvU6Ix6RK3A1hMAqMOnNYL9lbi+9g5AJpdJv2UVb87
bd6Myc3Gv5u9vNLPxpeU8ae7GavLb7tjTqopfwjPUFJ/rubySA0EUhMvtSJQqIVUR+S+L
649w+yFXARUjGIDcNi4bHVxNiM0UYJvY9CP5Fz4gNT5EgrLqTZOQqseODCkESiU/5foUv
Z3wuClSgFjfn9OSIwmjV3w0WnqPFZ5mn9o+fOQzLiZD6kZiKfgk0Ov0QS/WXcLQmT0w==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794942581;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
Received:Message-ID:Date:X-Mailing-List:List-Id:List-Post:List-Help:
List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To:
Content-Type:Content-Transfer-Encoding;
bh=+aYf8g41eVpT0waLNALL3a30OTIwyYVnd0XINX9JXbw=;
b=UqKuLptLDM1daRiL++YyM5P4v0ApjKfV71Ghg64/wyPfqBcadaxvMnYoBrDY3wKkae4o
xdTD2rxIdZR7LgnfurgaEVN7Yxcn4uNb7uV3uMAovuOMzPD922In18H1311QSsYCIIwfO
RqgmUcbOD2a4hMSnfL9cQif/hkbEpm1OTWUwzgkmm3lAur3nIqNGbEG/EWPa92XxCuc5A
Hez8jyrYLJaKHF/7ivz6/kGuZPPj3gqOdIYGhhX3lVyQWiAD3NLTjOgSwPwIhNykHReZW
emgnXvtfs5Ckldlecya/pPGJjZaqrEigM6UeebAkW5Dz70URc+rU/Pooowto9cO5XLg==
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=LTrFGvh2;
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 7C605606A337;
Tue, 17 Nov 2026 19:09:41 +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=LTrFGvh2
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.177
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1794942580;
b=asVmzxRpfbVK4lriCniN65F56N0D8ml95KUAj2FwUewRtDz7MK9s28e+iBvt1GpLONaR
0EW0SNcVv3ARn0eg4riFk5HCuIdA803VX5mjFgjbTbc3IfEnj5fkfwHZonTQSzfcwB0xO
3iaLbKJ3HzI8o5NhHL2+sp+GTNgTws+udy+mrttkHmnCCI8Uz14WoLscavYlavbRJYDKC
Gh65Yx9pyd6cbHla1HDAEHjrxtNLH4ZVb1Wb/fb2WkqmZscHstOFOwS+5MWIVP6JXMItX
y/CSGx70gSm8s5FtZs8Qxd1t8v5J/IkSX6XgqsgFplLF0Q+1U3L0A9hTj+MftgmP+xw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794942580;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Gm-Message-State:X-Gm-Gg:X-Received:Received:Message-ID:Date:
MIME-Version:User-Agent:Subject:To:Cc:References:Content-Language:
From:In-Reply-To:Content-Type:Content-Transfer-Encoding;
bh=+aYf8g41eVpT0waLNALL3a30OTIwyYVnd0XINX9JXbw=;
b=fBJ0J2hBBY4aJ+Nh5ji4MKQ7dQdwo3qagfpzxXJplqW3Uv2ESEgayTLWd8/PItdsjk0F
/rb5cqhVqCgn2GhM+d3Fjyo59Kg4qXfcDhLgxzfbF+r0L1RnRfn3ENOdbWlxJ8sjoP4nd
uTLeSkySxBcIpe5p1q9gAg7cqfrNfSTKF10xt15phMvrR7teGQKsgLNqhCA4yIxZm0cGQ
wbeLLh+30q/nc1tHw6QU5/oeSwCXANafWDwM2xKVf/wZoMj/Vf5mWgDIYbjKDhv8xqzHH
Y+4yadsYrZCvcsupEE4Jf+lZg7+LmX8mmxcmTHIrzwT/dMLNKg4/cI+NALGHu4v+9TA==
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=LTrFGvh2;
arc=none smtp.remote-ip=209.85.215.177
X-Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177])
(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 43C89606A32F
for <netdev@vger.kernel.org>; Tue, 17 Nov 2026 19:09:40 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 43C89606A32F
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-pg1-f177.google.com with SMTP id 41be03b00d2f7-cdb15cd8558so131663a12.2
for <netdev@vger.kernel.org>; Tue, 17 Nov 2026 11:09:40 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1794942579; x=1795547379; darn=vger.kernel.org;
h=content-transfer-encoding:content-type:in-reply-to:from
:content-language:references:cc:to:subject:user-agent:mime-version
:date:message-id:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=+aYf8g41eVpT0waLNALL3a30OTIwyYVnd0XINX9JXbw=;
b=LTrFGvh2up8kjBogLk1ZtofYatncwr6QZ2sdT8/epET8mDeNGmKTb219caMjagOQ/R
HqyRirJeJR1PjcUZDv0WZwz8DggWHkRljVrdRmNrb9YNTa1e9wUtlueBx/wQHStV5cXJ
Lz6SfZzFF0XEF0bJt6sWWm+y2HO7w/sZwJr63eMgnPhFWMIl7VhhBQKxoOuy5AWrk7/V
QS2tcp0a9MgB1Itek+FxYHoDJPV1QWg9IRPFx3X7VV0Z88EXxe7yMQYPD4vzVK+fD2GA
VqNjnZKz9HSwvBEH84jktD7qXuUgxt0+soidstQT81bfcSVk8PCOyG/fHsAwGH3y1OKM
/Ovg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1794942579; x=1795547379;
h=content-transfer-encoding:content-type:in-reply-to:from
:content-language:references:cc:to:subject:user-agent:mime-version
:date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=+aYf8g41eVpT0waLNALL3a30OTIwyYVnd0XINX9JXbw=;
b=BraqzcOEEBuSBfnj8WIVklDCjZ8fxgw6WlhuANhBqnY83Hm3HajUpBjx24R0/YoLHk
smcIDsJyUH9N2xcAzSfWtOiPCpUAeL8z5dhY8bhHaTeQDgVWIOuuTlAxCKnOr0eNS5dJ
99w1Da2xRN69F5Z5Qr72hHhv2hbDo4tHUugfQqT0A75ZshDY7/Vn+s1YpKwxS6k0IN6j
ZKhL2Q2dNBtO9/9QNwVZnYaPyfEG5DEjzlCNX93lbqYFEUZ8e+i4m4clS7jcBcIYunQb
H1Z0OoC212O3mg9eFAbvTh4ibO7ijP9MyI4ok4UFRN5K63vhQntgP7gH2rwmWQ/A1/rj
R+lw==
X-Gm-Message-State: APuU4Z81mJYuzXtOkBY0uEIJkMqjRzHHCA4p6QMjYHf6c9RJEMZLRSjI
ct8QBVXZuEcBAiODElJr6MbfdoP0CIFSPVvRcNw4tsQ3mFHKzlb9EmhONtFtsA==
X-Gm-Gg: AZFdTZd/ZsY9W7CitHBIHmhDd6F564dkDe1k/GYGXGZiwiPD+/gUP9Ao7fi//Jiz6wu
P/pSUHBN9CzWfyeY/XgdFlzbNIzoZK/MKAUphm9Wuzx7nVhcHxsCbo/0oJIP17HcS2q9XBgavfv
zKtJNVtQs1q6XDaStFKjbElSUFnwFwmQ10D1apQGiLwWNdyrbE1Jm1MbdIBuixLakzQGVkModdp
b+unruwP9W13Bo/WAbq/vgogfdctgAmij7D4veNKaPCbaPGFQuAIzgWGzF25kCsCH9tQbu33A0R
3Et4w4MzPxH1VFATCLEHrznDUvK+ijaN4/LlZWsuV2PemUfevuHQCTV3Vi5wi+M8wnnMq+guyYq
H0N3Zz7yeQuERcElccYCamKPaEBh94ymCjXVtfr8nqAgs5jBt8benmzVZL8A4vXJjYRx1+sqMyq
YQ/foWIOmzlMP3Clv9/Eo2gUmFuhOSaW9yyJSofoPEc231hFibPkg3SibjiFS/fVqDpZyIR+pP4
Cz9MlZDmA6qLZNrtp8OCfPT1qrxsqKfzUm1ZSTi42LFu1dYILgoqFrtu+XwYCf64I7Yf1/bgbyB
yz0bZoEQdICpGewKIBplW1+o8GoLx5xwmIOz3qAUUlHk3c3Xex9Zhi2d
X-Received: by 2002:a17:90a:d445:b0:3a7:ef4:164b with SMTP id 98e67ed59e1d1-3b3d06873d0mr304059a91.2.1794942579422;
Tue, 17 Nov 2026 11:09:39 -0800 (PST)
X-Received: from [10.67.48.245] ([192.19.223.252])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b3ac70ea45sm5191801a91.17.2026.11.17.11.09.35
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Tue, 17 Nov 2026 11:09:36 -0800 (PST)
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
X-User-Agent: Mozilla Thunderbird
X-Cc: netdev@vger.kernel.org, andrew+netdev@lunn.ch, davem@davemloft.net,
edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
hkallweit1@gmail.com, linux@armlinux.org.uk, shaojijie@huawei.com,
horms@kernel.org, runyu.xiao@seu.edu.cn, mmyangfl@gmail.com, hvr@gnu.org,
jeff@garzik.org, danny.kukawka@bisect.de, mugunthanvnm@ti.com,
sebastian.hesselbarth@gmail.com, linux-kernel@vger.kernel.org,
manuel.lauss@gmail.com
X-In-Reply-To: <179483704272.3136.4869685253432664524@kernel.org>