Re: [PATCH net 0/4] net: phy: restore driver state after userspace MII resets

From
James Hilliard <james.hilliard1@gmail.com>
Date
2026-11-13 16:39:33
Also in
lkml
Reply to
Andrew Lunn, 2026-11-13
On Fri, Nov 13, 2026 at 6:33 AM Andrew Lunn [off-list ref] wrote:
On Fri, Nov 13, 2026 at 01:48:39AM -0700, James Hilliard wrote:
quoted
An MII ioctl reset needs to restore the PHY driver's configuration and
software state before the PHY worker can access the device again.
The MII ioctl is a footgun. If you use it for writing registers, don't
be surprised if bad things happen. Even reading registers can cause
bad side effects, like missed interrupts.

The whole design is broken, there is no fixing it, so we don't try to
fix it.
Would it make sense to submit patches 1 and 2 as standalone fixes,
separate from the reset recovery changes?

The b44 patch removes a spinlock held across sleeping phylib/MDIO
operations, including ordinary register reads. The write-error patch
propagates MDIO failures and avoids updating cached settings or running
follow-up operations after a failed write.

These fixes are independent of each other and neither adds reset
recovery or attempts to make arbitrary register access safe.
Sorry, but NACK.

       Andrew
Thread (10 messages) 10 messages, 3 authors, last reply 3d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help