ethernet: suspend warning. [1/1]

PD#SWPL-108295

Problem:
renew suspend flow to fix
warning message

Solution:
fix suspend/resume warning

Verify:
AR321-T965D4_X9-REF#049

Change-Id: I7fefcd105ba8040ee0f7a3d09fb14c32be7c6839
Signed-off-by: Zhuo Wang <zhuo.wang@amlogic.com>
This commit is contained in:
Zhuo Wang
2023-02-06 16:19:32 +08:00
committed by Dongjin Kim
parent 0c6d34df70
commit 6a70e07856

View File

@@ -423,6 +423,7 @@ static void set_wol_notify_bl30(u32 enable_bl30)
static int aml_custom_setting(struct platform_device *pdev, struct meson8b_dwmac *dwmac)
{
struct device_node *np = pdev->dev.of_node;
struct net_device *ndev = platform_get_drvdata(pdev);
unsigned int mc_val = 0;
pr_info("aml_cust_setting\n");
@@ -432,6 +433,7 @@ static int aml_custom_setting(struct platform_device *pdev, struct meson8b_dwmac
writel(mc_val, dwmac->regs + PRG_ETH0);
}
ndev->wol_enabled = true;
return 0;
}
#endif
@@ -620,7 +622,6 @@ static int meson8b_suspend(struct device *dev)
set_wol_notify_bl30(true);
device_init_wakeup(dev, true);
priv->wolopts = 0x1 << 5;
ndev->wol_enabled = true;
/*phy is 100M, change to 10M*/
pr_info("link 100M -> 10M\n");
backup_adv = phy_read(phydev, MII_ADVERTISE);
@@ -628,13 +629,11 @@ static int meson8b_suspend(struct device *dev)
mii_lpa_to_linkmode_lpa_t(phydev->advertising, 0x61);
genphy_restart_aneg(phydev);
msleep(3000);
ret = stmmac_suspend(dev);
} else {
set_wol_notify_bl31(false);
set_wol_notify_bl30(false);
device_init_wakeup(dev, false);
ndev->wol_enabled = false;
ret = stmmac_suspend(dev);
if (dwmac->data->suspend)
@@ -652,6 +651,8 @@ static int meson8b_resume(struct device *dev)
int ret;
struct phy_device *phydev = ndev->phydev;
priv->wolopts = 0;
if (wol_switch_from_user) {
ret = stmmac_resume(dev);