All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] sfc: move initialisation of efx->filter_sem to efx_init_struct()
@ 2020-10-20 14:35 Edward Cree
  2020-10-21  4:24 ` Jakub Kicinski
  0 siblings, 1 reply; 2+ messages in thread
From: Edward Cree @ 2020-10-20 14:35 UTC (permalink / raw)
  To: linux-net-drivers, kuba; +Cc: davem, netdev

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: a9dc3d5612ce ("sfc_ef100: RX filter table management and related gubbins")
Signed-off-by: Edward Cree <ecree@solarflare.com>
---
 drivers/net/ethernet/sfc/efx_common.c | 1 +
 drivers/net/ethernet/sfc/rx_common.c  | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/sfc/efx_common.c b/drivers/net/ethernet/sfc/efx_common.c
index 72a3f0e09f52..de797e1ac5a9 100644
--- a/drivers/net/ethernet/sfc/efx_common.c
+++ b/drivers/net/ethernet/sfc/efx_common.c
@@ -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);
diff --git a/drivers/net/ethernet/sfc/rx_common.c b/drivers/net/ethernet/sfc/rx_common.c
index 5e29284c89c9..19cf7cac1e6e 100644
--- a/drivers/net/ethernet/sfc/rx_common.c
+++ b/drivers/net/ethernet/sfc/rx_common.c
@@ -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);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] sfc: move initialisation of efx->filter_sem to efx_init_struct()
  2020-10-20 14:35 [PATCH net] sfc: move initialisation of efx->filter_sem to efx_init_struct() Edward Cree
@ 2020-10-21  4:24 ` Jakub Kicinski
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2020-10-21  4:24 UTC (permalink / raw)
  To: Edward Cree; +Cc: linux-net-drivers, davem, netdev

On Tue, 20 Oct 2020 15:35:08 +0100 Edward Cree wrote:
> 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: a9dc3d5612ce ("sfc_ef100: RX filter table management and related gubbins")
> Signed-off-by: Edward Cree <ecree@solarflare.com>

Applied, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-21  4:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-20 14:35 [PATCH net] sfc: move initialisation of efx->filter_sem to efx_init_struct() Edward Cree
2020-10-21  4:24 ` Jakub Kicinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.