diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2009-04-15 00:54:07 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-15 00:54:07 -0400 |
commit | af22ab1bd20e9dedf3a37cc1d401ef8bbd587ef0 (patch) | |
tree | 6b13fa15d215522f6fec4f7161a8f3f0e37b0f5b /drivers/net | |
parent | 95615d90a321349709c80091f2a9cb284757ff0d (diff) |
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')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 862dd344533e..11fd153da85f 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) | |||
2723 | **/ | 2723 | **/ |
2724 | static void ixgbe_set_num_queues(struct ixgbe_adapter *adapter) | 2724 | static void ixgbe_set_num_queues(struct ixgbe_adapter *adapter) |
2725 | { | 2725 | { |
2726 | /* Start with base case */ | ||
2727 | adapter->num_rx_queues = 1; | ||
2728 | adapter->num_tx_queues = 1; | ||
2729 | |||
2730 | #ifdef CONFIG_IXGBE_DCB | 2726 | #ifdef CONFIG_IXGBE_DCB |
2731 | if (ixgbe_set_dcb_queues(adapter)) | 2727 | if (ixgbe_set_dcb_queues(adapter)) |
2732 | return; | 2728 | goto done; |
2733 | 2729 | ||
2734 | #endif | 2730 | #endif |
2735 | if (ixgbe_set_rss_queues(adapter)) | 2731 | if (ixgbe_set_rss_queues(adapter)) |
2736 | return; | 2732 | goto done; |
2733 | |||
2734 | /* fallback to base case */ | ||
2735 | adapter->num_rx_queues = 1; | ||
2736 | adapter->num_tx_queues = 1; | ||
2737 | |||
2738 | done: | ||
2739 | /* Notify the stack of the (possibly) reduced Tx Queue count. */ | ||
2740 | adapter->netdev->real_num_tx_queues = adapter->num_tx_queues; | ||
2737 | } | 2741 | } |
2738 | 2742 | ||
2739 | static void ixgbe_acquire_msix_vectors(struct ixgbe_adapter *adapter, | 2743 | static void ixgbe_acquire_msix_vectors(struct ixgbe_adapter *adapter, |
@@ -2992,9 +2996,6 @@ try_msi: | |||
2992 | } | 2996 | } |
2993 | 2997 | ||
2994 | out: | 2998 | out: |
2995 | /* Notify the stack of the (possibly) reduced Tx Queue count. */ | ||
2996 | adapter->netdev->real_num_tx_queues = adapter->num_tx_queues; | ||
2997 | |||
2998 | return err; | 2999 | return err; |
2999 | } | 3000 | } |
3000 | 3001 | ||