Commit 05f90bf3 authored by Edward Cree's avatar Edward Cree Committed by Jakub Kicinski
Browse files

sfc: move initialisation of efx->filter_sem to efx_init_struct()



efx_probe_filters() has not been called yet when EF100 calls into
 efx_mcdi_filter_table_probe(), for which it wants to take the
 filter_sem.

Fixes: a9dc3d56 ("sfc_ef100: RX filter table management and related gubbins")
Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
Link: https://lore.kernel.org/r/24fad43e-887d-051e-25e3-506f23f63abf@solarflare.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent b7c24497
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1014,6 +1014,7 @@ int efx_init_struct(struct efx_nic *efx,
	efx->num_mac_stats = MC_CMD_MAC_NSTATS;
	BUILD_BUG_ON(MC_CMD_MAC_NSTATS - 1 != MC_CMD_MAC_GENERATION_END);
	mutex_init(&efx->mac_lock);
	init_rwsem(&efx->filter_sem);
#ifdef CONFIG_RFS_ACCEL
	mutex_init(&efx->rps_mutex);
	spin_lock_init(&efx->rps_hash_lock);
+0 −1
Original line number Diff line number Diff line
@@ -797,7 +797,6 @@ int efx_probe_filters(struct efx_nic *efx)
{
	int rc;

	init_rwsem(&efx->filter_sem);
	mutex_lock(&efx->mac_lock);
	down_write(&efx->filter_sem);
	rc = efx->type->filter_table_probe(efx);