From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev-bot+sashiko@kernel.org
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
Subject: Re: [PATCH net v2 04/12] net: au1000: report MDIO transaction timeouts
Date: Tue, 17 Nov 2026 11:09:33 -0800 [thread overview]
Message-ID: <09116c63-4c6b-440d-914a-e75902dc36ae@gmail.com> (raw)
In-Reply-To: <179483704272.3136.4869685253432664524@kernel.org>
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
next prev parent reply other threads:[~2026-11-17 19:09 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 4:52 [PATCH net v2 00/12] net: au1000: Bug fixes Florian Fainelli
2026-11-12 4:52 ` [PATCH net v2 01/12] net: au1000: recycle RX descriptors on allocation failure Florian Fainelli
2026-11-12 4:52 ` [PATCH net v2 02/12] net: au1000: clear all-multicast mode when restoring hash filtering Florian Fainelli
2026-11-12 4:52 ` [PATCH net v2 03/12] net: au1000: disconnect the PHY before freeing the MDIO bus Florian Fainelli
2026-11-12 4:52 ` [PATCH net v2 04/12] net: au1000: report MDIO transaction timeouts Florian Fainelli
2026-11-16 13:50 ` netdev-bot+sashiko
2026-11-17 19:09 ` Florian Fainelli [this message]
2026-11-12 4:52 ` [PATCH net v2 05/12] net: au1000: serialize TX completion with packet submission Florian Fainelli
2026-11-12 4:52 ` [PATCH net v2 06/12] net: au1000: assign a valid MAC address without platform data Florian Fainelli
2026-11-16 13:50 ` netdev-bot+sashiko
2026-11-17 19:11 ` Florian Fainelli
2026-11-12 4:52 ` [PATCH net v2 07/12] net: au1000: fix buffer descriptor free list insertion Florian Fainelli
2026-11-16 13:50 ` netdev-bot+sashiko
2026-11-17 19:13 ` Florian Fainelli
2026-11-12 4:52 ` [PATCH net v2 08/12] net: au1000: restore receive filtering before enabling RX Florian Fainelli
2026-11-12 4:52 ` [PATCH net v2 09/12] net: au1000: restore RX buffer addresses when restarting the MAC Florian Fainelli
2026-11-12 4:52 ` [PATCH net v2 10/12] net: phy: smsc: wait for LAN83C183 power-down recovery Florian Fainelli
2026-11-16 13:50 ` netdev-bot+sashiko
2026-11-17 19:15 ` Florian Fainelli
2026-11-12 4:52 ` [PATCH net v2 11/12] net: au1000: keep the MAC stopped until the PHY link is ready Florian Fainelli
2026-11-16 13:50 ` netdev-bot+sashiko
2026-11-17 19:18 ` Florian Fainelli
2026-11-12 4:52 ` [PATCH net v2 12/12] net: au1000: reject frames larger than the TX bounce buffer Florian Fainelli
2026-11-16 13:50 ` netdev-bot+sashiko
2026-11-17 19:19 ` Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=09116c63-4c6b-440d-914a-e75902dc36ae@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=danny.kukawka@bisect.de \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=hvr@gnu.org \
--cc=jeff@garzik.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=manuel.lauss@gmail.com \
--cc=mmyangfl@gmail.com \
--cc=mugunthanvnm@ti.com \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=runyu.xiao@seu.edu.cn \
--cc=sebastian.hesselbarth@gmail.com \
--cc=shaojijie@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®