summaryrefslogtreecommitdiffstats
path: root/sys/dev/bce
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2007-01-20 17:05:12 +0000
committerscottl <scottl@FreeBSD.org>2007-01-20 17:05:12 +0000
commitc05aa6bb3f59fede85ec071d0c51776bd9eb0cbc (patch)
tree1c37ddd4b119029875032cfca2f54ef05ea49d67 /sys/dev/bce
parenta1996060b3e7be31b8b5135cf2deddda8512fae1 (diff)
downloadFreeBSD-src-c05aa6bb3f59fede85ec071d0c51776bd9eb0cbc.zip
FreeBSD-src-c05aa6bb3f59fede85ec071d0c51776bd9eb0cbc.tar.gz
The multicast hash table has 8 slots in the BCE hardware, not 4 slots like
the BGE hardware. Adapt the driver for this. Submitted by: Mike Karels MFC After: 3 days
Diffstat (limited to 'sys/dev/bce')
-rw-r--r--sys/dev/bce/if_bce.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c
index 9441c50..7ada8d0 100644
--- a/sys/dev/bce/if_bce.c
+++ b/sys/dev/bce/if_bce.c
@@ -5231,7 +5231,7 @@ bce_set_rx_mode(struct bce_softc *sc)
{
struct ifnet *ifp;
struct ifmultiaddr *ifma;
- u32 hashes[4] = { 0, 0, 0, 0 };
+ u32 hashes[NUM_MC_HASH_REGISTERS] = { 0, 0, 0, 0, 0, 0, 0, 0 };
u32 rx_mode, sort_mode;
int h, i;
@@ -5279,12 +5279,12 @@ bce_set_rx_mode(struct bce_softc *sc)
if (ifma->ifma_addr->sa_family != AF_LINK)
continue;
h = ether_crc32_le(LLADDR((struct sockaddr_dl *)
- ifma->ifma_addr), ETHER_ADDR_LEN) & 0x7F;
- hashes[(h & 0x60) >> 5] |= 1 << (h & 0x1F);
+ ifma->ifma_addr), ETHER_ADDR_LEN) & 0xFF;
+ hashes[(h & 0xE0) >> 5] |= 1 << (h & 0x1F);
}
IF_ADDR_UNLOCK(ifp);
- for (i = 0; i < 4; i++)
+ for (i = 0; i < NUM_MC_HASH_REGISTERS; i++)
REG_WR(sc, BCE_EMAC_MULTICAST_HASH0 + (i * 4), hashes[i]);
sort_mode |= BCE_RPM_SORT_USER0_MC_HSH_EN;
OpenPOWER on IntegriCloud