summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/ti/cpsw.c
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2020-05-29 17:10:09 +0200
committerJoerg Roedel <jroedel@suse.de>2020-05-29 17:10:09 +0200
commit4c201d58cfee8631350888bad9e8bae33e628605 (patch)
treea49a020d48af561d030b7d4869d193148b5a8088 /drivers/net/ethernet/ti/cpsw.c
parent555fb5ae0f39962417d35e02d77ee9b2c14a5428 (diff)
parent9cb1fd0efd195590b828b9b865421ad345a4a145 (diff)
Merge tag 'v5.7-rc7' into x86/amd
Linux 5.7-rc7
Diffstat (limited to 'drivers/net/ethernet/ti/cpsw.c')
-rw-r--r--drivers/net/ethernet/ti/cpsw.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index c2c5bf87da01..ffeb8633e530 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1753,11 +1753,15 @@ static int cpsw_suspend(struct device *dev)
struct cpsw_common *cpsw = dev_get_drvdata(dev);
int i;
+ rtnl_lock();
+
for (i = 0; i < cpsw->data.slaves; i++)
if (cpsw->slaves[i].ndev)
if (netif_running(cpsw->slaves[i].ndev))
cpsw_ndo_stop(cpsw->slaves[i].ndev);
+ rtnl_unlock();
+
/* Select sleep pin state */
pinctrl_pm_select_sleep_state(dev);