sfc: commonise efx->[rt]xq_entries initialisation
authorEdward Cree <ecree@solarflare.com>
Tue, 30 Jun 2020 12:14:45 +0000 (13:14 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Jun 2020 20:09:09 +0000 (13:09 -0700)
Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/efx.c
drivers/net/ethernet/sfc/efx_common.c

index 41a2c97..028d826 100644 (file)
@@ -385,7 +385,6 @@ static int efx_probe_all(struct efx_nic *efx)
                rc = -EINVAL;
                goto fail3;
        }
-       efx->rxq_entries = efx->txq_entries = EFX_DEFAULT_DMAQ_SIZE;
 
 #ifdef CONFIG_SFC_SRIOV
        rc = efx->type->vswitching_probe(efx);
index 251e37b..822e9e1 100644 (file)
@@ -1035,6 +1035,9 @@ int efx_init_struct(struct efx_nic *efx,
        INIT_WORK(&efx->mac_work, efx_mac_work);
        init_waitqueue_head(&efx->flush_wq);
 
+       efx->rxq_entries = EFX_DEFAULT_DMAQ_SIZE;
+       efx->txq_entries = EFX_DEFAULT_DMAQ_SIZE;
+
        efx->mem_bar = UINT_MAX;
 
        rc = efx_init_channels(efx);