diff options
author | Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> | 2011-11-25 05:48:06 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-26 19:52:29 (GMT) |
commit | 3bb62f4f95ba004048bafb460179b5db33aff787 (patch) | |
tree | 32bfedf731290148aefee6e6ac80a6d5f51ee18d /drivers/net/ethernet/emulex/benet | |
parent | 590c391dd362479b27a67c8d797ce348c5798b93 (diff) | |
download | linux-fsl-qoriq-3bb62f4f95ba004048bafb460179b5db33aff787.tar.xz |
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: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex/benet')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index c6fb7c3..a1b8ebc 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -1666,9 +1666,12 @@ static int be_tx_queues_create(struct be_adapter *adapter) u8 i; 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, adapter->num_tx_qs); + rtnl_unlock(); + } adapter->tx_eq.max_eqd = 0; adapter->tx_eq.min_eqd = 0; |