summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/siena.c
diff options
context:
space:
mode:
authorEdward Cree <ecree@solarflare.com>2020-06-29 14:33:44 +0100
committerDavid S. Miller <davem@davemloft.net>2020-06-29 17:37:48 -0700
commitde5f32e2b6301c1f6780b3ae9c2740a5e422e2da (patch)
treecd02ca00c551e20f3b52536bd67ee2fe93df66ec /drivers/net/ethernet/sfc/siena.c
parent08f9912ef01e184b6a0512ca062e4f743671dac2 (diff)
downloadlinux-de5f32e2b6301c1f6780b3ae9c2740a5e422e2da.tar.bz2
sfc: don't try to create more channels than we can have VIs
Calculate efx->max_vis at probe time, and check against it in efx_allocate_msix_channels() when considering whether to create XDP TX channels. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/siena.c')
-rw-r--r--drivers/net/ethernet/sfc/siena.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/siena.c b/drivers/net/ethernet/sfc/siena.c
index 891e9fb6abec..6462bbe2448a 100644
--- a/drivers/net/ethernet/sfc/siena.c
+++ b/drivers/net/ethernet/sfc/siena.c
@@ -276,6 +276,7 @@ static int siena_probe_nic(struct efx_nic *efx)
}
efx->max_channels = EFX_MAX_CHANNELS;
+ efx->max_vis = EFX_MAX_CHANNELS;
efx->max_tx_channels = EFX_MAX_CHANNELS;
efx_reado(efx, &reg, FR_AZ_CS_DEBUG);