aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2012-02-14 15:15:57 -0500
committerBen Hutchings <bhutchings@solarflare.com>2012-02-15 19:25:11 -0500
commita9a52506277275b73955504bf4df745502a28b8b (patch)
tree20994ef7b4ba2d5d88cee23e1a2de24e003cfde2
parent7f967c011ae9c59fc7e7a017070ef7b22a5a4fbf (diff)
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>
-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)
1169 pci_disable_device(efx->pci_dev); 1169 pci_disable_device(efx->pci_dev);
1170} 1170}
1171 1171
1172static unsigned int efx_wanted_parallelism(void) 1172static unsigned int efx_wanted_parallelism(struct efx_nic *efx)
1173{ 1173{
1174 cpumask_var_t thread_mask; 1174 cpumask_var_t thread_mask;
1175 unsigned int count; 1175 unsigned int count;
@@ -1179,8 +1179,8 @@ static unsigned int efx_wanted_parallelism(void)
1179 return rss_cpus; 1179 return rss_cpus;
1180 1180
1181 if (unlikely(!zalloc_cpumask_var(&thread_mask, GFP_KERNEL))) { 1181 if (unlikely(!zalloc_cpumask_var(&thread_mask, GFP_KERNEL))) {
1182 printk(KERN_WARNING 1182 netif_warn(efx, probe, efx->net_dev,
1183 "sfc: RSS disabled due to allocation failure\n"); 1183 "RSS disabled due to allocation failure\n");
1184 return 1; 1184 return 1;
1185 } 1185 }
1186 1186
@@ -1239,7 +1239,7 @@ static int efx_probe_interrupts(struct efx_nic *efx)
1239 struct msix_entry xentries[EFX_MAX_CHANNELS]; 1239 struct msix_entry xentries[EFX_MAX_CHANNELS];
1240 unsigned int n_channels; 1240 unsigned int n_channels;
1241 1241
1242 n_channels = efx_wanted_parallelism(); 1242 n_channels = efx_wanted_parallelism(efx);
1243 if (separate_tx_channels) 1243 if (separate_tx_channels)
1244 n_channels *= 2; 1244 n_channels *= 2;
1245 n_channels += extra_channels; 1245 n_channels += extra_channels;