Commit 03eb3eb4 authored by Timur Tabi's avatar Timur Tabi Committed by David S. Miller
Browse files

net: qcom/emac: add shutdown function

The shutdown function halts all DMA and interrupts, so that all
operations are discontinued when the system shuts down, e.g. via
kexec or a forced reboot.
Tested-by: default avatarTyler Baicar <>
Signed-off-by: default avatarTimur Tabi <>
Signed-off-by: default avatarDavid S. Miller <>
parent e3c42b61
......@@ -762,6 +762,19 @@ static int emac_remove(struct platform_device *pdev)
return 0;
static void emac_shutdown(struct platform_device *pdev)
struct net_device *netdev = dev_get_drvdata(&pdev->dev);
struct emac_adapter *adpt = netdev_priv(netdev);
struct emac_sgmii *sgmii = &adpt->phy;
/* Closing the SGMII turns off its interrupts */
/* Resetting the MAC turns off all DMA and its interrupts */
static struct platform_driver emac_platform_driver = {
.probe = emac_probe,
.remove = emac_remove,
......@@ -770,6 +783,7 @@ static struct platform_driver emac_platform_driver = {
.of_match_table = emac_dt_match,
.acpi_match_table = ACPI_PTR(emac_acpi_match),
.shutdown = emac_shutdown,
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