summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/atheros/alx
diff options
context:
space:
mode:
authorSabrina Dubroca <sd@queasysnail.net>2018-06-29 17:51:26 +0200
committerDavid S. Miller <davem@davemloft.net>2018-06-30 14:14:47 +0200
commitbc800e8b39bad60ccdb83be828da63af71ab87b3 (patch)
treeb6ad410a3d3edd6f7befdde60d555c1f033c320c /drivers/net/ethernet/atheros/alx
parentsfc: correctly initialise filter rwsem for farch (diff)
downloadlinux-bc800e8b39bad60ccdb83be828da63af71ab87b3.tar.xz
linux-bc800e8b39bad60ccdb83be828da63af71ab87b3.zip
alx: take rtnl before calling __alx_open from resume
The __alx_open function can be called from ndo_open, which is called under RTNL, or from alx_resume, which isn't. Since commit d768319cd427, we're calling the netif_set_real_num_{tx,rx}_queues functions, which need to be called under RTNL. This is similar to commit 0c2cc02e571a ("igb: Move the calls to set the Tx and Rx queues into igb_open"). Fixes: d768319cd427 ("alx: enable multiple tx queues") Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/atheros/alx')
-rw-r--r--drivers/net/ethernet/atheros/alx/main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c
index 567ee54504bc..5e5022fa1d04 100644
--- a/drivers/net/ethernet/atheros/alx/main.c
+++ b/drivers/net/ethernet/atheros/alx/main.c
@@ -1897,13 +1897,19 @@ static int alx_resume(struct device *dev)
struct pci_dev *pdev = to_pci_dev(dev);
struct alx_priv *alx = pci_get_drvdata(pdev);
struct alx_hw *hw = &alx->hw;
+ int err;
alx_reset_phy(hw);
if (!netif_running(alx->dev))
return 0;
netif_device_attach(alx->dev);
- return __alx_open(alx, true);
+
+ rtnl_lock();
+ err = __alx_open(alx, true);
+ rtnl_unlock();
+
+ return err;
}
static SIMPLE_DEV_PM_OPS(alx_pm_ops, alx_suspend, alx_resume);