if_bge.c (193103) | if_bge.c (195049) |
---|---|
1/*- 2 * Copyright (c) 2001 Wind River Systems 3 * Copyright (c) 1997, 1998, 1999, 2001 4 * Bill Paul <wpaul@windriver.com>. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 18 unchanged lines hidden (view full) --- 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 34#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001 Wind River Systems 3 * Copyright (c) 1997, 1998, 1999, 2001 4 * Bill Paul <wpaul@windriver.com>. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 18 unchanged lines hidden (view full) --- 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: head/sys/dev/bge/if_bge.c 193103 2009-05-30 17:56:19Z attilio $"); | 35__FBSDID("$FreeBSD: head/sys/dev/bge/if_bge.c 195049 2009-06-26 11:45:06Z rwatson $"); |
36 37/* 38 * Broadcom BCM570x family gigabit ethernet driver for FreeBSD. 39 * 40 * The Broadcom BCM5700 is based on technology originally developed by 41 * Alteon Networks as part of the Tigon I and Tigon II gigabit ethernet 42 * MAC chips. The BCM5700, sometimes refered to as the Tigon III, has 43 * two on-board MIPS R4000 CPUs and can have as much as 16MB of external --- 1137 unchanged lines hidden (view full) --- 1181 return; 1182 } 1183 1184 /* First, zot all the existing filters. */ 1185 for (i = 0; i < 4; i++) 1186 CSR_WRITE_4(sc, BGE_MAR0 + (i * 4), 0); 1187 1188 /* Now program new ones. */ | 36 37/* 38 * Broadcom BCM570x family gigabit ethernet driver for FreeBSD. 39 * 40 * The Broadcom BCM5700 is based on technology originally developed by 41 * Alteon Networks as part of the Tigon I and Tigon II gigabit ethernet 42 * MAC chips. The BCM5700, sometimes refered to as the Tigon III, has 43 * two on-board MIPS R4000 CPUs and can have as much as 16MB of external --- 1137 unchanged lines hidden (view full) --- 1181 return; 1182 } 1183 1184 /* First, zot all the existing filters. */ 1185 for (i = 0; i < 4; i++) 1186 CSR_WRITE_4(sc, BGE_MAR0 + (i * 4), 0); 1187 1188 /* Now program new ones. */ |
1189 IF_ADDR_LOCK(ifp); | 1189 if_maddr_rlock(ifp); |
1190 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { 1191 if (ifma->ifma_addr->sa_family != AF_LINK) 1192 continue; 1193 h = ether_crc32_le(LLADDR((struct sockaddr_dl *) 1194 ifma->ifma_addr), ETHER_ADDR_LEN) & 0x7F; 1195 hashes[(h & 0x60) >> 5] |= 1 << (h & 0x1F); 1196 } | 1190 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { 1191 if (ifma->ifma_addr->sa_family != AF_LINK) 1192 continue; 1193 h = ether_crc32_le(LLADDR((struct sockaddr_dl *) 1194 ifma->ifma_addr), ETHER_ADDR_LEN) & 0x7F; 1195 hashes[(h & 0x60) >> 5] |= 1 << (h & 0x1F); 1196 } |
1197 IF_ADDR_UNLOCK(ifp); | 1197 if_maddr_runlock(ifp); |
1198 1199 for (i = 0; i < 4; i++) 1200 CSR_WRITE_4(sc, BGE_MAR0 + (i * 4), hashes[i]); 1201} 1202 1203static void 1204bge_setvlan(struct bge_softc *sc) 1205{ --- 3628 unchanged lines hidden --- | 1198 1199 for (i = 0; i < 4; i++) 1200 CSR_WRITE_4(sc, BGE_MAR0 + (i * 4), hashes[i]); 1201} 1202 1203static void 1204bge_setvlan(struct bge_softc *sc) 1205{ --- 3628 unchanged lines hidden --- |