aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/efx.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2012-02-14 20:15:57 +0000
committerBen Hutchings <bhutchings@solarflare.com>2012-02-16 00:25:11 +0000
commita9a52506277275b73955504bf4df745502a28b8b (patch)
tree20994ef7b4ba2d5d88cee23e1a2de24e003cfde2 /drivers/net/ethernet/sfc/efx.c
parentsfc: Add support for 'extra' channel types (diff)
downloadlinux-dev-a9a52506277275b73955504bf4df745502a28b8b.tar.xz
linux-dev-a9a52506277275b73955504bf4df745502a28b8b.zip
sfc: Pass NIC structure into efx_wanted_parallelism()
This lets us identify the NIC affected in case of failure, and will be necessary to adjust for SR-IOV constraints. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/efx.c')
-rw-r--r--drivers/net/ethernet/sfc/efx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 0a9ab49eef95..e943ffbe5e2a 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -1169,7 +1169,7 @@ static void efx_fini_io(struct efx_nic *efx)
pci_disable_device(efx->pci_dev);
}
-static unsigned int efx_wanted_parallelism(void)
+static unsigned int efx_wanted_parallelism(struct efx_nic *efx)
{
cpumask_var_t thread_mask;
unsigned int count;
@@ -1179,8 +1179,8 @@ static unsigned int efx_wanted_parallelism(void)
return rss_cpus;
if (unlikely(!zalloc_cpumask_var(&thread_mask, GFP_KERNEL))) {
- printk(KERN_WARNING
- "sfc: RSS disabled due to allocation failure\n");
+ netif_warn(efx, probe, efx->net_dev,
+ "RSS disabled due to allocation failure\n");
return 1;
}
@@ -1239,7 +1239,7 @@ static int efx_probe_interrupts(struct efx_nic *efx)
struct msix_entry xentries[EFX_MAX_CHANNELS];
unsigned int n_channels;
- n_channels = efx_wanted_parallelism();
+ n_channels = efx_wanted_parallelism(efx);
if (separate_tx_channels)
n_channels *= 2;
n_channels += extra_channels;