summaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2009-04-14 21:54:07 -0700
committerDavid S. Miller <davem@davemloft.net>2009-04-14 21:54:07 -0700
commitaf22ab1bd20e9dedf3a37cc1d401ef8bbd587ef0 (patch)
tree6b13fa15d215522f6fec4f7161a8f3f0e37b0f5b /drivers/net/ixgbe
parent95615d90a321349709c80091f2a9cb284757ff0d (diff)
downloadop-kernel-dev-af22ab1bd20e9dedf3a37cc1d401ef8bbd587ef0.zip
op-kernel-dev-af22ab1bd20e9dedf3a37cc1d401ef8bbd587ef0.tar.gz
ixgbe: update real_num_tx_queues on changing num_rx_queues
Move the update of real_num_tx_queues from ixgbe_acquire_msix_vectors() to ixgbe_set_num_queues(), to ensure it be always in sync with num_tx_queues. Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 862dd34..11fd153 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -2723,17 +2723,21 @@ static inline bool ixgbe_set_rss_queues(struct ixgbe_adapter *adapter)
**/
static void ixgbe_set_num_queues(struct ixgbe_adapter *adapter)
{
- /* Start with base case */
- adapter->num_rx_queues = 1;
- adapter->num_tx_queues = 1;
-
#ifdef CONFIG_IXGBE_DCB
if (ixgbe_set_dcb_queues(adapter))
- return;
+ goto done;
#endif
if (ixgbe_set_rss_queues(adapter))
- return;
+ goto done;
+
+ /* fallback to base case */
+ adapter->num_rx_queues = 1;
+ adapter->num_tx_queues = 1;
+
+done:
+ /* Notify the stack of the (possibly) reduced Tx Queue count. */
+ adapter->netdev->real_num_tx_queues = adapter->num_tx_queues;
}
static void ixgbe_acquire_msix_vectors(struct ixgbe_adapter *adapter,
@@ -2992,9 +2996,6 @@ try_msi:
}
out:
- /* Notify the stack of the (possibly) reduced Tx Queue count. */
- adapter->netdev->real_num_tx_queues = adapter->num_tx_queues;
-
return err;
}
OpenPOWER on IntegriCloud