Netdev List
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: xuanqiang.luo@linux.dev
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: Wed, 5 Aug 2026 14:11:49 +0200	[thread overview]
Message-ID: <19f04c24-cf3d-4730-ae15-ab7f2f7bc3f1@lunn.ch> (raw)
In-Reply-To: <20260805072725.169431-1-xuanqiang.luo@linux.dev>

> +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.

>  	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?

> +	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().


    Andrew

---
pw-bot: cr

       reply	other threads:[~2026-08-05 12:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260805072725.169431-1-xuanqiang.luo@linux.dev>
2026-08-05 12:11 ` Andrew Lunn [this message]
2026-08-06  1:53   ` [PATCH net v3] net: phy: dp83640: fix per-bus clock lifetime luoxuanqiang

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=19f04c24-cf3d-4730-ae15-ab7f2f7bc3f1@lunn.ch \
    --to=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 \
    --cc=xuanqiang.luo@linux.dev \
    /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