]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
sfc: Cleanup Falcon-arch simple MAC filter state
authorBen Hutchings <bhutchings@solarflare.com>
Mon, 19 Nov 2012 23:08:22 +0000 (23:08 +0000)
committerBen Hutchings <bhutchings@solarflare.com>
Thu, 22 Aug 2013 18:26:02 +0000 (19:26 +0100)
commit964e61355e94905e4234839d4b41678998d617b7
tree317a5e30a89b07eabaa9376bbbb00d574fce4df2
parentf5253d92567b193c6aa137a08e7bb3b06fafc985
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>
drivers/net/ethernet/sfc/efx.c
drivers/net/ethernet/sfc/falcon.c
drivers/net/ethernet/sfc/farch.c
drivers/net/ethernet/sfc/mcdi_port.c
drivers/net/ethernet/sfc/net_driver.h
drivers/net/ethernet/sfc/nic.h
drivers/net/ethernet/sfc/siena.c