Commit d9f45ab9 authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller

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: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Acked-by: default avatarDoug Berger <opendmb@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 554032cd
......@@ -3596,6 +3596,11 @@ static int bcmgenet_remove(struct platform_device *pdev)
return 0;
}
static void bcmgenet_shutdown(struct platform_device *pdev)
{
bcmgenet_remove(pdev);
}
#ifdef CONFIG_PM_SLEEP
static int bcmgenet_resume(struct device *d)
{
......@@ -3714,6 +3719,7 @@ static SIMPLE_DEV_PM_OPS(bcmgenet_pm_ops, bcmgenet_suspend, bcmgenet_resume);
static struct platform_driver bcmgenet_driver = {
.probe = bcmgenet_probe,
.remove = bcmgenet_remove,
.shutdown = bcmgenet_shutdown,
.driver = {
.name = "bcmgenet",
.of_match_table = bcmgenet_match,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment