Skip to content

Commit dac978e

Browse files
Neil MandirPaolo Abeni
authored andcommitted
net: macb: Disable clocks once
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 <[email protected]> Co-developed-by: Sean Anderson <[email protected]> Signed-off-by: Sean Anderson <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent bd2902e commit dac978e

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
@@ -5404,14 +5404,11 @@ static void macb_remove(struct platform_device *pdev)
54045404
mdiobus_unregister(bp->mii_bus);
54055405
mdiobus_free(bp->mii_bus);
54065406

5407+
device_set_wakeup_enable(&bp->pdev->dev, 0);
54075408
cancel_work_sync(&bp->hresp_err_bh_work);
54085409
pm_runtime_disable(&pdev->dev);
54095410
pm_runtime_dont_use_autosuspend(&pdev->dev);
5410-
if (!pm_runtime_suspended(&pdev->dev)) {
5411-
macb_clks_disable(bp->pclk, bp->hclk, bp->tx_clk,
5412-
bp->rx_clk, bp->tsu_clk);
5413-
pm_runtime_set_suspended(&pdev->dev);
5414-
}
5411+
pm_runtime_set_suspended(&pdev->dev);
54155412
phylink_destroy(bp->phylink);
54165413
free_netdev(dev);
54175414
}

0 commit comments

Comments
 (0)