summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2007-01-30 03:21:11 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2007-01-30 03:21:11 +0000
commitd34950d258240450cc4bec0c30ab7e86a83d82dc (patch)
tree470dcf567c5a9a0e8a82494f5d4b05e4f418ded8
parent44970e00614f9753d7c8051d3f48ab817d20a4a8 (diff)
Allow the bnx(4) driver to make use of all of the available hardware
multicast hash slots. The bnx(4) hardware supports 8 slots instead of 4 like the bge(4) hardware. From Mike Karels via FreeBSD Tested by Brad, biorn@ and Johan M:son Lindman
-rw-r--r--sys/dev/pci/if_bnx.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/pci/if_bnx.c b/sys/dev/pci/if_bnx.c
index 46e16ec70e7..dcc054180f2 100644
--- a/sys/dev/pci/if_bnx.c
+++ b/sys/dev/pci/if_bnx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bnx.c,v 1.42 2007/01/27 12:38:59 krw Exp $ */
+/* $OpenBSD: if_bnx.c,v 1.43 2007/01/30 03:21:10 krw Exp $ */
/*-
* Copyright (c) 2006 Broadcom Corporation
@@ -4784,7 +4784,7 @@ bnx_set_rx_mode(struct bnx_softc *sc)
struct ifnet *ifp = &ac->ac_if;
struct ether_multi *enm;
struct ether_multistep step;
- u_int32_t hashes[4] = { 0, 0, 0, 0 };
+ u_int32_t hashes[NUM_MC_HASH_REGISTERS] = { 0, 0, 0, 0, 0, 0, 0, 0 };
u_int32_t rx_mode, sort_mode;
int h, i;
@@ -4831,12 +4831,12 @@ allmulti:
goto allmulti;
}
h = ether_crc32_le(enm->enm_addrlo, ETHER_ADDR_LEN) &
- 0x7F;
- hashes[(h & 0x60) >> 5] |= 1 << (h & 0x1F);
+ 0xFF;
+ hashes[(h & 0xE0) >> 5] |= 1 << (h & 0x1F);
ETHER_NEXT_MULTI(step, enm);
}
- for (i = 0; i < 4; i++)
+ for (i = 0; i < NUM_MC_HASH_REGISTERS; i++)
REG_WR(sc, BNX_EMAC_MULTICAST_HASH0 + (i * 4),
hashes[i]);