aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/falcon.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-11-25 11:12:16 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-26 18:59:49 -0500
commit8be4f3e6f7b670529bd67aa1f0319bec1e29ebcf (patch)
tree1d92fa5b1b1046f052c20d8bdaa17ffce6881446 /drivers/net/sfc/falcon.c
parent9007b9fa368b172e6b9a985899080fbebb7d3204 (diff)
sfc: Change MAC promiscuity and multicast hash at the same time
From: Steve Hodgson <shodgson@solarflare.com> Currently we can set multicast hash immediately (in atomic context) but must delay setting MAC promiscuity. There is not that much point in deferring one but not the other, and setting the multicast hash on Siena will involve a firmware request. So process them both in efx_mac_work(). Also, set the broadcast bit in the multicast hash in efx_set_multicast_list(), since this is required for both Falcon and Siena. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/falcon.c')
-rw-r--r--drivers/net/sfc/falcon.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c
index fac534a274c8..e26043eb01b5 100644
--- a/drivers/net/sfc/falcon.c
+++ b/drivers/net/sfc/falcon.c
@@ -1993,7 +1993,7 @@ void falcon_reconfigure_mac_wrapper(struct efx_nic *efx)
1993 efx_writeo(efx, &reg, FR_AB_MAC_CTRL); 1993 efx_writeo(efx, &reg, FR_AB_MAC_CTRL);
1994 1994
1995 /* Restore the multicast hash registers. */ 1995 /* Restore the multicast hash registers. */
1996 falcon_set_multicast_hash(efx); 1996 falcon_push_multicast_hash(efx);
1997 1997
1998 /* Transmission of pause frames when RX crosses the threshold is 1998 /* Transmission of pause frames when RX crosses the threshold is
1999 * covered by RX_XOFF_MAC_EN and XM_TX_CFG_REG:XM_FCNTL. 1999 * covered by RX_XOFF_MAC_EN and XM_TX_CFG_REG:XM_FCNTL.
@@ -2327,15 +2327,11 @@ void falcon_remove_port(struct efx_nic *efx)
2327 ************************************************************************** 2327 **************************************************************************
2328 */ 2328 */
2329 2329
2330void falcon_set_multicast_hash(struct efx_nic *efx) 2330void falcon_push_multicast_hash(struct efx_nic *efx)
2331{ 2331{
2332 union efx_multicast_hash *mc_hash = &efx->multicast_hash; 2332 union efx_multicast_hash *mc_hash = &efx->multicast_hash;
2333 2333
2334 /* Broadcast packets go through the multicast hash filter. 2334 WARN_ON(!mutex_is_locked(&efx->mac_lock));
2335 * ether_crc_le() of the broadcast address is 0xbe2612ff
2336 * so we always add bit 0xff to the mask.
2337 */
2338 set_bit_le(0xff, mc_hash->byte);
2339 2335
2340 efx_writeo(efx, &mc_hash->oword[0], FR_AB_MAC_MC_HASH_REG0); 2336 efx_writeo(efx, &mc_hash->oword[0], FR_AB_MAC_MC_HASH_REG0);
2341 efx_writeo(efx, &mc_hash->oword[1], FR_AB_MAC_MC_HASH_REG1); 2337 efx_writeo(efx, &mc_hash->oword[1], FR_AB_MAC_MC_HASH_REG1);