mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Hilliard <james.hilliard1@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: 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>,
	 Michael Chan <michael.chan@broadcom.com>,
	Hauke Mehrtens <hauke@hauke-m.de>,
	netdev@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 0/4] net: phy: restore driver state after userspace MII resets
Date: Fri, 13 Nov 2026 09:39:17 -0700	[thread overview]
Message-ID: <CADvTj4oPugtaeAXPvjJ10nhfKGDWTKbtALfuyF1+wUsHu2e90A@mail.gmail.com> (raw)
In-Reply-To: <11acd5b1-3099-4e3f-9fdf-a3c5c6f098c4@lunn.ch>

On Fri, Nov 13, 2026 at 6:33 AM Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Fri, Nov 13, 2026 at 01:48:39AM -0700, James Hilliard wrote:
> > 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

  reply	other threads:[~2026-11-13 16:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13  8:48 James Hilliard
2026-11-13  8:48 ` [PATCH net 1/4] net: b44: keep phylib ioctls outside the spinlock James Hilliard
2026-11-13  8:48 ` [PATCH net 2/4] net: phy: propagate MII register write errors James Hilliard
2026-11-13  8:48 ` [PATCH net 3/4] net: phy: quiesce the state machine during MII resets James Hilliard
2026-11-13  8:48 ` [PATCH net 4/4] net: phylink: reinitialize the PHY after an MII reset James Hilliard
2026-11-13  8:53 ` [PATCH net 0/4] net: phy: restore driver state after userspace MII resets netdev-bot+sinfo
2026-11-13  9:28   ` James Hilliard
2026-11-13 13:33 ` Andrew Lunn
2026-11-13 16:39   ` James Hilliard [this message]
2026-11-13 17:50     ` Andrew Lunn

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=CADvTj4oPugtaeAXPvjJ10nhfKGDWTKbtALfuyF1+wUsHu2e90A@mail.gmail.com \
    --to=james.hilliard1@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=hauke@hauke-m.de \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --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®