From: luoxuanqiang <xuanqiang.luo@linux.dev>
To: Andrew Lunn <andrew@lunn.ch>, Jakub Kicinski <kuba@kernel.org>
Cc: richardcochran@gmail.com, hkallweit1@gmail.com,
linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com,
pabeni@redhat.com, maxime.chevallier@bootlin.com,
netdev@vger.kernel.org, Xuanqiang Luo <luoxuanqiang@kylinos.cn>
Subject: Re: [PATCH net v1] net: phy: dp83640: fix per-bus clock lifetime
Date: Thu, 30 Jul 2026 09:47:17 +0800 [thread overview]
Message-ID: <7e61d730-f897-443c-9d02-04ec456e1367@linux.dev> (raw)
In-Reply-To: <73276f2b-9a0a-40d6-bf5f-9d23d2731c57@lunn.ch>
在 2026/7/29 21:39, Andrew Lunn 写道:
> On Tue, Jul 28, 2026 at 07:03:40PM -0700, Jakub Kicinski wrote:
>> On Fri, 24 Jul 2026 10:35:32 +0800 xuanqiang.luo@linux.dev wrote:
>>> Commit 42e2a9e11a1d ("net: phy: dp83640: improve phydev and driver
>>> removal handling") moved per-bus clock cleanup from module exit to the
>>> remove path. This leaves two lifetime problems.
>> Isn't this sort of shared PHY resource problem supposed to be solved
>> using the PHY package API?
> Ah! Sorry, my reply was completely wrong, now that i have looked at
> the patch.
>
> We have clocks and we have clocks. To me, a clock is something which
> uses the common clock framework, because it is a clock. clk_get,
> clk_enable, clk_disable.
>
> And then we have these PTP things, which some people call clocks, but
> they are something else. And in this patch, we are talking about this
> something else.
>
> And you are correct, it does appear to be one of these PTP things
> which is shared by a number of PHYs. So yes, the PHY package API
> should be used here.
>
> Xuanqiang please take a look at drivers/net/phy/phy_package.c, and the
> PHYs which use it. It should help solve your lifetime problems.
>
> Andrew
>
> ---
> pw-bot: cr
>
Thanks Jakub and Andrew for pointing this out.
That does look like a much cleaner way to handle the lifetime of the
shared PTP clock.
I'll rework the patch and send a v2.
prev parent reply other threads:[~2026-07-30 1:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 2:35 [PATCH net v1] net: phy: dp83640: fix per-bus clock lifetime xuanqiang.luo
2026-07-29 2:03 ` Jakub Kicinski
2026-07-29 13:22 ` Andrew Lunn
2026-07-29 13:39 ` Andrew Lunn
2026-07-30 1:47 ` luoxuanqiang [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=7e61d730-f897-443c-9d02-04ec456e1367@linux.dev \
--to=xuanqiang.luo@linux.dev \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=luoxuanqiang@kylinos.cn \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.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