if_ffec.c (266152) | if_ffec.c (266274) |
---|---|
1/*- 2 * Copyright (c) 2013 Ian Lepore <ian@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 */ 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2013 Ian Lepore <ian@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: stable/10/sys/dev/ffec/if_ffec.c 266152 2014-05-15 16:11:06Z ian $"); | 29__FBSDID("$FreeBSD: stable/10/sys/dev/ffec/if_ffec.c 266274 2014-05-16 23:27:18Z ian $"); |
30 31/* 32 * Driver for Freescale Fast Ethernet Controller, found on imx-series SoCs among 33 * others. Also works for the ENET Gigibit controller found on imx6 and imx28, 34 * but the driver doesn't currently use any of the ENET advanced features other 35 * than enabling gigabit. 36 * 37 * The interface name 'fec' is already taken by netgraph's Fast Etherchannel --- 917 unchanged lines hidden (view full) --- 955 else { 956 ghash = 0; 957 if_maddr_rlock(ifp); 958 TAILQ_FOREACH(ifma, &sc->ifp->if_multiaddrs, ifma_link) { 959 if (ifma->ifma_addr->sa_family != AF_LINK) 960 continue; 961 crc = ether_crc32_be(LLADDR((struct sockaddr_dl *) 962 ifma->ifma_addr), ETHER_ADDR_LEN); | 30 31/* 32 * Driver for Freescale Fast Ethernet Controller, found on imx-series SoCs among 33 * others. Also works for the ENET Gigibit controller found on imx6 and imx28, 34 * but the driver doesn't currently use any of the ENET advanced features other 35 * than enabling gigabit. 36 * 37 * The interface name 'fec' is already taken by netgraph's Fast Etherchannel --- 917 unchanged lines hidden (view full) --- 955 else { 956 ghash = 0; 957 if_maddr_rlock(ifp); 958 TAILQ_FOREACH(ifma, &sc->ifp->if_multiaddrs, ifma_link) { 959 if (ifma->ifma_addr->sa_family != AF_LINK) 960 continue; 961 crc = ether_crc32_be(LLADDR((struct sockaddr_dl *) 962 ifma->ifma_addr), ETHER_ADDR_LEN); |
963 ghash |= 1 << (crc & 0x3f); | 963 ghash |= 1LLU << (crc & 0x3f); |
964 } 965 if_maddr_runlock(ifp); 966 } 967 WR4(sc, FEC_GAUR_REG, (uint32_t)(ghash >> 32)); 968 WR4(sc, FEC_GALR_REG, (uint32_t)ghash); 969 970 /* 971 * Set the individual address filter hash. --- 790 unchanged lines hidden --- | 964 } 965 if_maddr_runlock(ifp); 966 } 967 WR4(sc, FEC_GAUR_REG, (uint32_t)(ghash >> 32)); 968 WR4(sc, FEC_GALR_REG, (uint32_t)ghash); 969 970 /* 971 * Set the individual address filter hash. --- 790 unchanged lines hidden --- |