aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 4e0ce91321dd..c35185cb27fe 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -4088,7 +4088,7 @@ static inline bool ixgbe_set_sriov_queues(struct ixgbe_adapter *adapter)
4088 * fallthrough conditions. 4088 * fallthrough conditions.
4089 * 4089 *
4090 **/ 4090 **/
4091static void ixgbe_set_num_queues(struct ixgbe_adapter *adapter) 4091static int ixgbe_set_num_queues(struct ixgbe_adapter *adapter)
4092{ 4092{
4093 /* Start with base case */ 4093 /* Start with base case */
4094 adapter->num_rx_queues = 1; 4094 adapter->num_rx_queues = 1;
@@ -4097,7 +4097,7 @@ static void ixgbe_set_num_queues(struct ixgbe_adapter *adapter)
4097 adapter->num_rx_queues_per_pool = 1; 4097 adapter->num_rx_queues_per_pool = 1;
4098 4098
4099 if (ixgbe_set_sriov_queues(adapter)) 4099 if (ixgbe_set_sriov_queues(adapter))
4100 return; 4100 goto done;
4101 4101
4102#ifdef IXGBE_FCOE 4102#ifdef IXGBE_FCOE
4103 if (ixgbe_set_fcoe_queues(adapter)) 4103 if (ixgbe_set_fcoe_queues(adapter))
@@ -4120,8 +4120,10 @@ static void ixgbe_set_num_queues(struct ixgbe_adapter *adapter)
4120 adapter->num_tx_queues = 1; 4120 adapter->num_tx_queues = 1;
4121 4121
4122done: 4122done:
4123 /* Notify the stack of the (possibly) reduced Tx Queue count. */ 4123 /* Notify the stack of the (possibly) reduced queue counts. */
4124 netif_set_real_num_tx_queues(adapter->netdev, adapter->num_tx_queues); 4124 netif_set_real_num_tx_queues(adapter->netdev, adapter->num_tx_queues);
4125 return netif_set_real_num_rx_queues(adapter->netdev,
4126 adapter->num_rx_queues);
4125} 4127}
4126 4128
4127static void ixgbe_acquire_msix_vectors(struct ixgbe_adapter *adapter, 4129static void ixgbe_acquire_msix_vectors(struct ixgbe_adapter *adapter,
@@ -4550,7 +4552,9 @@ static int ixgbe_set_interrupt_capability(struct ixgbe_adapter *adapter)
4550 if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) 4552 if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED)
4551 ixgbe_disable_sriov(adapter); 4553 ixgbe_disable_sriov(adapter);
4552 4554
4553 ixgbe_set_num_queues(adapter); 4555 err = ixgbe_set_num_queues(adapter);
4556 if (err)
4557 return err;
4554 4558
4555 err = pci_enable_msi(adapter->pdev); 4559 err = pci_enable_msi(adapter->pdev);
4556 if (!err) { 4560 if (!err) {
@@ -4675,7 +4679,9 @@ int ixgbe_init_interrupt_scheme(struct ixgbe_adapter *adapter)
4675 int err; 4679 int err;
4676 4680
4677 /* Number of supported queues */ 4681 /* Number of supported queues */
4678 ixgbe_set_num_queues(adapter); 4682 err = ixgbe_set_num_queues(adapter);
4683 if (err)
4684 return err;
4679 4685
4680 err = ixgbe_set_interrupt_capability(adapter); 4686 err = ixgbe_set_interrupt_capability(adapter);
4681 if (err) { 4687 if (err) {