From: Andrew Lunn <andrew@lunn.ch>
To: "leo.moerlein@proton.me" <leo.moerlein@proton.me>
Cc: netdev@vger.kernel.org, Hauke Mehrtens <hauke@hauke-m.de>,
Russell King <linux@armlinux.org.uk>,
Paolo Abeni <pabeni@redhat.com>,
Buday Csaba <buday.csaba@prolan.hu>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: phy: mdio_device: leave PHY reset deasserted on unregister
Date: Wed, 20 May 2026 17:55:27 +0200 [thread overview]
Message-ID: <57b43ade-2c7b-4eaf-b9fa-406edee0fe44@lunn.ch> (raw)
In-Reply-To: <20260520151355.1371163-1-leo.moerlein@proton.me>
On Wed, May 20, 2026 at 03:13:59PM +0000, leo.moerlein@proton.me wrote:
> From: Leonardo Mörlein <leo.moerlein@proton.me>
>
> Some PHY devices are discovered again after the MDIO bus is torn down and
> reprobed, for example when a parent driver first returns -EPROBE_DEFER and
> is probed again later.
>
> This breaks boards where external PHYs have per-device reset lines
> described through reset-gpios. mdiobus_register_device() acquires the
> reset GPIO and asserts reset, mdio_probe() later deasserts it for the
> active device, but mdiobus_unregister_device() used to release the GPIO
> descriptor without first driving the line back to the inactive state.
> If that descriptor was the last owner, then the PHY could remain held
> in reset across the next bus registration and disappear from the reprobe
> scan.
I'm wondering if we are fixing the wrong thing here.
Rather than take it out of reset, should it not be put into reset? I
assume the bootloader is taking it out of reset?
Or does it have a pullup/down so if the GPIO defaults as an input/HiZ,
it defaults out of reset? When the GPIO is unregistered, are we
leaving it as an output?
Andrew
next prev parent reply other threads:[~2026-05-20 15:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 15:13 leo.moerlein
2026-05-20 15:55 ` Andrew Lunn [this message]
2026-05-20 22:53 ` Leonardo Mörlein
2026-05-20 23:39 ` Andrew Lunn
2026-06-06 12:03 ` Leonardo Mörlein
2026-05-21 8:47 ` Buday Csaba
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=57b43ade-2c7b-4eaf-b9fa-406edee0fe44@lunn.ch \
--to=andrew@lunn.ch \
--cc=buday.csaba@prolan.hu \
--cc=hauke@hauke-m.de \
--cc=leo.moerlein@proton.me \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--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®