From: Andrew Lunn <andrew@lunn.ch>
To: Florian Fainelli <florian.fainelli@broadcom.com>
Cc: netdev@vger.kernel.org, Carlos Soto <carlos.soto@broadcom.com>,
Doug Berger <opendmb@gmail.com>,
Nicolai Buchwitz <nb@tipi-net.de>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
open list <linux-kernel@vger.kernel.org>,
Mlody12 mlody12 <kudzo51@gmail.com>
Subject: Re: [PATCH net-next 2/3] net: mdio: mdio-bcm-unimac: Poll for completion at 1us granularity
Date: Fri, 13 Nov 2026 22:58:07 +0100 [thread overview]
Message-ID: <db69534f-a523-4d9e-ba80-af8518e85fbb@lunn.ch> (raw)
In-Reply-To: <20261113211554.2058181-3-florian.fainelli@broadcom.com>
On Fri, Nov 13, 2026 at 01:15:53PM -0800, Florian Fainelli wrote:
> The current polling code unconditionally waits 30us, which was sized for
> a ~25us Clause 22 transaction, and then polls MDIO_CMD with a sleep of up
> to 2ms between samples.
>
> Adding Clause 45 support means that every access becomes two back to back
> transactions (an ADDR cycle followed by a READ/WRITE cycle), so a fixed
> delay sized for a single C22 transaction is no longer meaningful, and a
> sleep of up to 2ms between samples can add significant latency to each
> access when the transaction has not completed at the first sample.
>
> Instead, poll the MDIO_START_BUSY bit every microsecond so that the
> completion is noticed as soon as it happens, regardless of the type of
> transaction. This turns the wait into a busy wait, which is bounded by a
> timeout reduced from 100ms to 1ms: a 64 bit MDIO frame takes about 33us at
> the lowest MDIO clock the driver can program from a 250MHz reference clock,
> so even a two frame C45 access completes well within that.
>
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
> Co-developed-by: Carlos Soto <carlos.soto@broadcom.com>
> Signed-off-by: Carlos Soto <carlos.soto@broadcom.com>
Nitpick: Since you are submitting it, your Signed-off-by: should come
last.
Apart from that, please add my Reviewed-by: Andrew Lunn
<andrew@lunn.ch>
Andrew
next prev parent reply other threads:[~2026-11-13 21:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 21:15 [PATCH net-next 0/3] net: mdio: Clause 45 support for Florian Fainelli
2026-11-13 21:15 ` [PATCH net-next 1/3] net: mdio: mdio-bcm-unimac: Define MDIO_OP_SHIFT Florian Fainelli
2026-11-13 21:55 ` Andrew Lunn
2026-11-13 21:15 ` [PATCH net-next 2/3] net: mdio: mdio-bcm-unimac: Poll for completion at 1us granularity Florian Fainelli
2026-11-13 21:58 ` Andrew Lunn [this message]
2026-11-13 21:15 ` [PATCH net-next 3/3] net: mdio: mdio-bcm-unimac: Add Clause 45 support Florian Fainelli
2026-11-13 22:04 ` Andrew Lunn
2026-11-13 22:14 ` Florian Fainelli
2026-11-14 0:00 ` [PATCH net-next 0/3] net: mdio: Clause 45 support for Kordian Chmielewski
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=db69534f-a523-4d9e-ba80-af8518e85fbb@lunn.ch \
--to=andrew@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=carlos.soto@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=florian.fainelli@broadcom.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=kudzo51@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=nb@tipi-net.de \
--cc=netdev@vger.kernel.org \
--cc=opendmb@gmail.com \
--cc=pabeni@redhat.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