netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: luoxuanqiang <xuanqiang.luo@linux.dev>
To: Andrew Lunn <andrew@lunn.ch>
Cc: kuba@kernel.org, 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 v3] net: phy: dp83640: fix per-bus clock lifetime
Date: Thu, 6 Aug 2026 09:53:00 +0800	[thread overview]
Message-ID: <384a323e-406d-4e5e-a26e-e08a04d66051@linux.dev> (raw)
In-Reply-To: <19f04c24-cf3d-4730-ae15-ab7f2f7bc3f1@lunn.ch>

Hi Andrew,

在 2026/8/5 20:11, Andrew Lunn 写道:
>> +static void dp83640_clock_init(struct dp83640_clock *clock)
>>   {
>> -	INIT_LIST_HEAD(&clock->list);
>> -	clock->bus = bus;
>>   	mutex_init(&clock->extreg_lock);
>>   	mutex_init(&clock->clock_lock);
>>   	INIT_LIST_HEAD(&clock->phylist);
>> +	clock->caps.pin_config = clock->pin_config;
> Can this patch be split up a bit? It is not clear to my why this is
> needed. If you have lots of small patches, each with good commit
> messages, you can explain "Why?" this is needed.

You're right. I'll split the changes into small, independently reviewable
patches.

>>   	clock->caps.owner = THIS_MODULE;
>>   	sprintf(clock->caps.name, "dp83640 timer");
>>   	clock->caps.max_adj	= 1953124;
>> @@ -977,14 +971,8 @@ static void dp83640_clock_init(struct dp83640_clock *clock, struct mii_bus *bus)
>>   	clock->caps.settime64	= ptp_dp83640_settime;
>>   	clock->caps.enable	= ptp_dp83640_enable;
>>   	clock->caps.verify	= ptp_dp83640_verify;
>> -	/*
>> -	 * Convert the module param defaults into a dynamic pin configuration.
>> -	 */
>> +	/* Convert the module param defaults into the pin configuration. */
>>   	dp83640_gpio_defaults(clock->caps.pin_config);
> Why is this no longer dynamic?

Sorry, the updated comment is misleading.

The pin configuration is no longer dynamically allocated, but it can
still be changed at runtime via ptp_set_pinfunc().

I'll fix the comment and move this change into a separate patch,
since it can be reviewed independently.

>> +	clock = phy_package_get_priv(phydev);
>> +	/* Ensure other PHY probes wait for shared clock initialization. */
>> +	mutex_lock(&phydev->mdio.bus->shared_lock);
> Please add phy_package_lock() and phy_package_unlock().
>
I'll add phy_package_lock() and phy_package_unlock().

Thanks,
Xuanqiang


      reply	other threads:[~2026-08-06  1:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-05  7:27 [PATCH net v3] net: phy: dp83640: fix per-bus clock lifetime xuanqiang.luo
2026-08-05 12:11 ` Andrew Lunn
2026-08-06  1:53   ` 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=384a323e-406d-4e5e-a26e-e08a04d66051@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;
as well as URLs for NNTP newsgroup(s).