diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-11-19 23:08:22 +0000 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2013-08-22 19:26:02 +0100 |
commit | 964e61355e94905e4234839d4b41678998d617b7 (patch) | |
tree | 317a5e30a89b07eabaa9376bbbb00d574fce4df2 /drivers/net/ethernet/sfc/siena.c | |
parent | f5253d92567b193c6aa137a08e7bb3b06fafc985 (diff) | |
download | linux-964e61355e94905e4234839d4b41678998d617b7.tar.bz2 |
sfc: Cleanup Falcon-arch simple MAC filter state
On Falcon we implement MAC filtering requested by the stack using the
MAC wrapper's single unicast filter and multicast hash filter. Siena
is very similar, though MAC configuration is mediated by the MC.
Since MCDI operations may sleep, reconfiguration is deferred from
ndo_set_rx_mode to a work item. However, it still updates the private
variables describing the filter state synchronously. Contrary to
comments, the later use of these variables is not protected using the
address lock, resulting in race conditions.
Move the state update to a new function
efx_farch_filter_sync_rx_mode() and make the Falcon-arch MAC
configuration functions call that, so that its use is consistently
serialised by the mac_lock.
Invert and rename the promiscuous flag to the more accurate
unicast_filter, and comment that both this and multicast_hash are
not used on EF10.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/siena.c')
-rw-r--r-- | drivers/net/ethernet/sfc/siena.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/siena.c b/drivers/net/ethernet/sfc/siena.c index 5120cd8f706b..1be81e431f07 100644 --- a/drivers/net/ethernet/sfc/siena.c +++ b/drivers/net/ethernet/sfc/siena.c @@ -503,6 +503,8 @@ static int siena_mac_reconfigure(struct efx_nic *efx) MC_CMD_SET_MCAST_HASH_IN_HASH0_OFST + sizeof(efx->multicast_hash)); + efx_farch_filter_sync_rx_mode(efx); + WARN_ON(!mutex_is_locked(&efx->mac_lock)); rc = efx_mcdi_set_mac(efx); |