From: Andrew Lunn <andrew@lunn.ch>
To: David Yang <mmyangfl@gmail.com>
Cc: netdev@vger.kernel.org, Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2] net: dsa: motorcomm: Resync SMI slave before register access
Date: Tue, 17 Nov 2026 03:10:12 +0100 [thread overview]
Message-ID: <c5f399bf-4050-4c1c-8a5f-b983b321b181@lunn.ch> (raw)
In-Reply-To: <20261116162303.1368472-1-mmyangfl@gmail.com>
On Tue, Nov 17, 2026 at 12:23:00AM +0800, David Yang wrote:
> A register access over MDIO is 4 frames: 2 address writes followed by
> 2 data reads or writes. The SMI slave tracks the phase in a state
> machine, so an access interrupted between frames, e.g. on an MDIO bus
> error, leaves the machine in an unknown state, and every following
> access fails or acts on a stale address until the machine is realigned.
>
> The driver has so far assumed every access succeeds, and relied on
> manual resetting when the state machine wedged. However, without a
> dedicated reset line, the reset itself goes through the same SMI
> interface, causing a chicken-and-egg problem.
>
> Realign the machine once at reset, before the first register access.
>
> Signed-off-by: David Yang <mmyangfl@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
prev parent reply other threads:[~2026-11-17 2:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 16:23 David Yang
2026-11-17 2:10 ` Andrew Lunn [this message]
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=c5f399bf-4050-4c1c-8a5f-b983b321b181@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmyangfl@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@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
all inboxes | Powered by JetHome®