mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
eth: add shutdown function [1/1]
PD#SWPL-110094 Problem: eth interface has not closed during shutdown Solution: add shutdown function Verify: T963D4-AY309#custom verify Change-Id: I235bac19eb7771b9a92eaa143986bdf47d19bbcd Signed-off-by: xiangyang.yan <xiangyang.yan@amlogic.com>
This commit is contained in:
committed by
Dongjin Kim
parent
6a70e07856
commit
2da0dfff25
@@ -583,6 +583,19 @@ err_remove_config_dt:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void meson8b_dwmac_shutdown(struct platform_device *pdev)
|
||||
{
|
||||
struct net_device *ndev = platform_get_drvdata(pdev);
|
||||
struct stmmac_priv *priv = netdev_priv(ndev);
|
||||
struct meson8b_dwmac *dwmac = get_stmmac_bsp_priv(&pdev->dev);
|
||||
int ret;
|
||||
|
||||
pr_info("aml_eth_shutdown\n");
|
||||
ret = stmmac_suspend(priv->device);
|
||||
if (dwmac->data->suspend)
|
||||
ret = dwmac->data->suspend(dwmac);
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_AMLOGIC_ETH_PRIVE)
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int dwmac_suspend(struct meson8b_dwmac *dwmac)
|
||||
@@ -755,6 +768,7 @@ static struct platform_driver meson8b_dwmac_driver = {
|
||||
#else
|
||||
.remove = stmmac_pltfr_remove,
|
||||
#endif
|
||||
.shutdown = meson8b_dwmac_shutdown,
|
||||
.driver = {
|
||||
.name = "meson8b-dwmac",
|
||||
#if IS_ENABLED(CONFIG_AMLOGIC_ETH_PRIVE)
|
||||
|
||||
Reference in New Issue
Block a user