Skip to content

Commit 3fdc52c

Browse files
Neil Mandirgregkh
authored andcommitted
net: macb: Disable clocks once
[ Upstream commit dac978e ] When the driver is removed the clocks are disabled twice: once in macb_remove and a second time by runtime pm. Disable wakeup in remove so all the clocks are disabled and skip the second call to macb_clks_disable. Always suspend the device as we always set it active in probe. Fixes: d54f89a ("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> Link: https://patch.msgid.link/20250826143022.935521-1-sean.anderson@linux.dev Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 71581a8 commit 3fdc52c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/net/ethernet/cadence/macb_main.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5396,14 +5396,11 @@ static void macb_remove(struct platform_device *pdev)
53965396
mdiobus_unregister(bp->mii_bus);
53975397
mdiobus_free(bp->mii_bus);
53985398

5399+
device_set_wakeup_enable(&bp->pdev->dev, 0);
53995400
cancel_work_sync(&bp->hresp_err_bh_work);
54005401
pm_runtime_disable(&pdev->dev);
54015402
pm_runtime_dont_use_autosuspend(&pdev->dev);
5402-
if (!pm_runtime_suspended(&pdev->dev)) {
5403-
macb_clks_disable(bp->pclk, bp->hclk, bp->tx_clk,
5404-
bp->rx_clk, bp->tsu_clk);
5405-
pm_runtime_set_suspended(&pdev->dev);
5406-
}
5403+
pm_runtime_set_suspended(&pdev->dev);
54075404
phylink_destroy(bp->phylink);
54085405
free_netdev(dev);
54095406
}

0 commit comments

Comments
 (0)