Skip to content

Commit d9f45ab

Browse files
ffainellidavem330
authored andcommitted
net: bcmgenet: Add a shutdown callback
Make sure that we completely quiesce the network device, including its DMA to avoid having it continue to receive packets while there is no software alive to service those. Signed-off-by: Florian Fainelli <[email protected]> Acked-by: Doug Berger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 554032c commit d9f45ab

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/net/ethernet/broadcom/genet/bcmgenet.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3596,6 +3596,11 @@ static int bcmgenet_remove(struct platform_device *pdev)
35963596
return 0;
35973597
}
35983598

3599+
static void bcmgenet_shutdown(struct platform_device *pdev)
3600+
{
3601+
bcmgenet_remove(pdev);
3602+
}
3603+
35993604
#ifdef CONFIG_PM_SLEEP
36003605
static int bcmgenet_resume(struct device *d)
36013606
{
@@ -3714,6 +3719,7 @@ static SIMPLE_DEV_PM_OPS(bcmgenet_pm_ops, bcmgenet_suspend, bcmgenet_resume);
37143719
static struct platform_driver bcmgenet_driver = {
37153720
.probe = bcmgenet_probe,
37163721
.remove = bcmgenet_remove,
3722+
.shutdown = bcmgenet_shutdown,
37173723
.driver = {
37183724
.name = "bcmgenet",
37193725
.of_match_table = bcmgenet_match,

0 commit comments

Comments
 (0)