summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc/siena.c
diff options
context:
space:
mode:
authorShradha Shah <sshah@solarflare.com>2015-08-28 12:55:42 +0300
committerDavid S. Miller <davem@davemloft.net>2015-08-28 23:53:47 +0300
commitb0fbdae127a3968688ff7b474e9164dc4bf30dd5 (patch)
treec814ddbcc6d45d2b8ba973d8d6db30f7676254d7 /drivers/net/ethernet/sfc/siena.c
parenta69265e9f65a6747c27b01b4030ad85d71aa11ba (diff)
downloadlinux-b0fbdae127a3968688ff7b474e9164dc4bf30dd5.tar.xz
sfc: Allow driver to cope with a lower number of VIs than it needs for RSS
Previously, the driver would refuse to load if it couldn't secure enough VIs from the MC to fulfill its RSS requirements. This was causing probe to fail on later functions in configurations where we'd run out of VIs, such as having many VFs. This change allows the driver to load with fewer VIs, down to a minimum of 2. A warning will be printed saying that RSS requirements were not met, possibly affecting performance. efx->max_tx_channels needs to be set to avoid going down the failure path in efx_probe_nic() immediately in the loop after the probe() NIC-type function. Also, Set rc=ENOSPC when bombing out of efx_probe_nic due to lack of VIs. Signed-off-by: Shradha Shah <sshah@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 b2f886d90429..2219b5424d2b 100644
--- a/drivers/net/ethernet/sfc/siena.c
+++ b/drivers/net/ethernet/sfc/siena.c
@@ -262,6 +262,7 @@ static int siena_probe_nic(struct efx_nic *efx)
}
efx->max_channels = EFX_MAX_CHANNELS;
+ efx->max_tx_channels = EFX_MAX_CHANNELS;
efx_reado(efx, &reg, FR_AZ_CS_DEBUG);
efx->port_num = EFX_OWORD_FIELD(reg, FRF_CZ_CS_PORT_NUM) - 1;