qlcnic: Allow single Tx/Rx queue for all adapters.
authorHimanshu Madhani <himanshu.madhani@qlogic.com>
Tue, 17 Dec 2013 14:01:52 +0000 (09:01 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 17 Dec 2013 22:09:43 +0000 (17:09 -0500)
o Allow user to set sigle Tx/Rx queue in MSI-x mode,
  for ALL supported adapters.

Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c

index 406ab1b442699fce49d16042b8effe32dca5516a..01c7799bc82535ebf53ef5c3426b363c6ff8a782 100644 (file)
@@ -289,6 +289,7 @@ int qlcnic_83xx_setup_intr(struct qlcnic_adapter *adapter)
                if (qlcnic_sriov_vf_check(adapter))
                        return -EINVAL;
                num_msix = 1;
+               adapter->drv_tx_rings = QLCNIC_SINGLE_RING;
        }
        /* setup interrupt mapping table for fw */
        ahw->intr_tbl = vzalloc(num_msix *
index 0149c94953474e6ad0ffd56b93cc440c67e77687..9e1494aab4d7bd7ba2cab969302bb9b612bb4ede 100644 (file)
@@ -1466,8 +1466,7 @@ int qlcnic_82xx_napi_add(struct qlcnic_adapter *adapter,
        for (ring = 0; ring < adapter->drv_sds_rings; ring++) {
                sds_ring = &recv_ctx->sds_rings[ring];
                if (qlcnic_check_multi_tx(adapter) &&
-                   !adapter->ahw->diag_test &&
-                   (adapter->drv_tx_rings > QLCNIC_SINGLE_RING)) {
+                   !adapter->ahw->diag_test) {
                        netif_napi_add(netdev, &sds_ring->napi, qlcnic_rx_poll,
                                       NAPI_POLL_WEIGHT);
                } else {
@@ -1540,8 +1539,7 @@ void qlcnic_82xx_napi_enable(struct qlcnic_adapter *adapter)
 
        if (qlcnic_check_multi_tx(adapter) &&
            (adapter->flags & QLCNIC_MSIX_ENABLED) &&
-           !adapter->ahw->diag_test &&
-           (adapter->drv_tx_rings > QLCNIC_SINGLE_RING)) {
+           !adapter->ahw->diag_test) {
                for (ring = 0; ring < adapter->drv_tx_rings; ring++) {
                        tx_ring = &adapter->tx_ring[ring];
                        napi_enable(&tx_ring->napi);
index 45b1da15ce4762db32e0a51c450320bc9ec367a2..72a1c12decdeec98cd5a5e488176d7f9fa95d6ca 100644 (file)
@@ -646,8 +646,7 @@ int qlcnic_enable_msix(struct qlcnic_adapter *adapter, u32 num_msix)
                        } else {
                                adapter->ahw->num_msix = num_msix;
                                if (qlcnic_check_multi_tx(adapter) &&
-                                   !adapter->ahw->diag_test &&
-                                   (adapter->drv_tx_rings > 1))
+                                   !adapter->ahw->diag_test)
                                        drv_sds_rings = num_msix - drv_tx_rings;
                                else
                                        drv_sds_rings = num_msix;
@@ -3722,12 +3721,6 @@ int qlcnic_validate_rings(struct qlcnic_adapter *adapter, __u32 ring_cnt,
                return -EINVAL;
        }
 
-       if (ring_cnt < 2) {
-               netdev_err(netdev,
-                          "%s rings value should not be lower than 2\n", buf);
-               return -EINVAL;
-       }
-
        if (!is_power_of_2(ring_cnt)) {
                netdev_err(netdev, "%s rings value should be a power of 2\n",
                           buf);