alx: take rtnl before calling __alx_open from resume
[ Upstream commit bc800e8b39bad60ccdb83be828da63af71ab87b3 ] The __alx_open function can be called from ndo_open, which is called under RTNL, or from alx_resume, which isn't. Since commitd768319cd4, we're calling the netif_set_real_num_{tx,rx}_queues functions, which need to be called under RTNL. This is similar to commit0c2cc02e57("igb: Move the calls to set the Tx and Rx queues into igb_open"). Fixes:d768319cd4("alx: enable multiple tx queues") Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
03bb918775
commit
c62e2f087a
1 changed files with 7 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue