From: Florian Fainelli <florian.fainelli@broadcom.com>
To: Sean Anderson <sean.anderson@linux.dev>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Harini Katakam <harini.katakam@xilinx.com>,
Neil Mandir <neil.mandir@seco.com>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>,
Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>,
Nicolas Ferre <nicolas.ferre@microchip.com>
Subject: Re: [PATCH net] net: macb: Disable clocks once
Date: Mon, 25 Aug 2025 10:08:25 -0700 [thread overview]
Message-ID: <77d8a847-424e-4757-a703-709b6042236b@broadcom.com> (raw)
In-Reply-To: <20250825165925.679275-1-sean.anderson@linux.dev>
On 8/25/25 09:59, Sean Anderson wrote:
> From: Neil Mandir <neil.mandir@seco.com>
>
> When the driver is removed the clocks are twice: once by the driver and a
> second time by runtime pm. Remove the redundant clock disabling. Disable
> wakeup so all the clocks are disabled. Always suspend the device as we
> always set it active in probe.
There is a missing word in that first sentence which I assume is "disabled".
>
> Fixes: d54f89af6cc4 ("net: macb: Add pm runtime support")
> Signed-off-by: Neil Mandir <neil.mandir@seco.com>
> Co-developed-by: Sean Anderson <sean.anderson@linux.dev>
> Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
> ---
>
> drivers/net/ethernet/cadence/macb_main.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index ce95fad8cedd..8e9bfd0f040d 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -5403,14 +5403,11 @@ static void macb_remove(struct platform_device *pdev)
> mdiobus_free(bp->mii_bus);
>
> unregister_netdev(dev);
> + device_set_wakeup_enable(&bp->pdev->dev, 0);
> cancel_work_sync(&bp->hresp_err_bh_work);
> pm_runtime_disable(&pdev->dev);
> pm_runtime_dont_use_autosuspend(&pdev->dev);
> - if (!pm_runtime_suspended(&pdev->dev)) {
> - macb_clks_disable(bp->pclk, bp->hclk, bp->tx_clk,
> - bp->rx_clk, bp->tsu_clk);
> - pm_runtime_set_suspended(&pdev->dev);
> - }
> + pm_runtime_set_suspended(&pdev->dev);
> phylink_destroy(bp->phylink);
> free_netdev(dev);
> }
--
Florian
next prev parent reply other threads:[~2025-08-25 17:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-25 16:59 Sean Anderson
2025-08-25 17:08 ` Florian Fainelli [this message]
2025-08-26 0:45 ` Jakub Kicinski
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=77d8a847-424e-4757-a703-709b6042236b@broadcom.com \
--to=florian.fainelli@broadcom.com \
--cc=andrew+netdev@lunn.ch \
--cc=claudiu.beznea@tuxon.dev \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=harini.katakam@xilinx.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neil.mandir@seco.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=pabeni@redhat.com \
--cc=sean.anderson@linux.dev \
--cc=shubhrajyoti.datta@xilinx.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®