Commit 3bb62f4f authored by Padmanabh Ratnakar's avatar Padmanabh Ratnakar Committed by David S. Miller

be2net: Fix error recovery paths

When TX queues are created again after error recovery,
netif_set_real_num_tx_queues() is invoked to update number of real
TX queues created. rtnl lock needs to be held when invoking this routine.
Signed-off-by: default avatarPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 590c391d
...@@ -1666,9 +1666,12 @@ static int be_tx_queues_create(struct be_adapter *adapter) ...@@ -1666,9 +1666,12 @@ static int be_tx_queues_create(struct be_adapter *adapter)
u8 i; u8 i;
adapter->num_tx_qs = be_num_txqs_want(adapter); adapter->num_tx_qs = be_num_txqs_want(adapter);
if (adapter->num_tx_qs != MAX_TX_QS) if (adapter->num_tx_qs != MAX_TX_QS) {
rtnl_lock();
netif_set_real_num_tx_queues(adapter->netdev, netif_set_real_num_tx_queues(adapter->netdev,
adapter->num_tx_qs); adapter->num_tx_qs);
rtnl_unlock();
}
adapter->tx_eq.max_eqd = 0; adapter->tx_eq.max_eqd = 0;
adapter->tx_eq.min_eqd = 0; adapter->tx_eq.min_eqd = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment