Skip to content

Commit 4494c10

Browse files
RyceancurryPaolo Abeni
authored andcommitted
net: bcmasp: Remove phy_{suspend/resume}
phy_{suspend/resume} is redundant. It gets called from phy_{stop/start}. Fixes: 490cb41 ("net: bcmasp: Add support for ASP2.0 Ethernet controller") Signed-off-by: Justin Chen <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent dfd222e commit 4494c10

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,10 +1044,6 @@ static int bcmasp_netif_init(struct net_device *dev, bool phy_connect)
10441044

10451045
/* Indicate that the MAC is responsible for PHY PM */
10461046
phydev->mac_managed_pm = true;
1047-
} else if (!intf->wolopts) {
1048-
ret = phy_resume(dev->phydev);
1049-
if (ret)
1050-
goto err_phy_disable;
10511047
}
10521048

10531049
umac_reset(intf);
@@ -1334,7 +1330,6 @@ int bcmasp_interface_suspend(struct bcmasp_intf *intf)
13341330
{
13351331
struct device *kdev = &intf->parent->pdev->dev;
13361332
struct net_device *dev = intf->ndev;
1337-
int ret = 0;
13381333

13391334
if (!netif_running(dev))
13401335
return 0;
@@ -1344,10 +1339,6 @@ int bcmasp_interface_suspend(struct bcmasp_intf *intf)
13441339
bcmasp_netif_deinit(dev);
13451340

13461341
if (!intf->wolopts) {
1347-
ret = phy_suspend(dev->phydev);
1348-
if (ret)
1349-
goto out;
1350-
13511342
if (intf->internal_phy)
13521343
bcmasp_ephy_enable_set(intf, false);
13531344
else
@@ -1364,11 +1355,7 @@ int bcmasp_interface_suspend(struct bcmasp_intf *intf)
13641355

13651356
clk_disable_unprepare(intf->parent->clk);
13661357

1367-
return ret;
1368-
1369-
out:
1370-
bcmasp_netif_init(dev, false);
1371-
return ret;
1358+
return 0;
13721359
}
13731360

13741361
static void bcmasp_resume_from_wol(struct bcmasp_intf *intf)

0 commit comments

Comments
 (0)