Deleted Added
full compact
if_tl.c (147256) if_tl.c (148654)
1/*-
2 * Copyright (c) 1997, 1998
3 * Bill Paul <wpaul@ctr.columbia.edu>. 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

--- 17 unchanged lines hidden (view full) ---

26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1997, 1998
3 * Bill Paul <wpaul@ctr.columbia.edu>. 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

--- 17 unchanged lines hidden (view full) ---

26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/pci/if_tl.c 147256 2005-06-10 16:49:24Z brooks $");
34__FBSDID("$FreeBSD: head/sys/pci/if_tl.c 148654 2005-08-03 00:18:35Z rwatson $");
35
36/*
37 * Texas Instruments ThunderLAN driver for FreeBSD 2.2.6 and 3.x.
38 * Supports many Compaq PCI NICs based on the ThunderLAN ethernet controller,
39 * the National Semiconductor DP83840A physical interface and the
40 * Microchip Technology 24Cxx series serial EEPROM.
41 *
42 * Written using the following four documents:

--- 912 unchanged lines hidden (view full) ---

955 tl_dio_write32(sc, TL_HASH2, 0);
956
957 /* Now program new ones. */
958 if (ifp->if_flags & IFF_ALLMULTI) {
959 hashes[0] = 0xFFFFFFFF;
960 hashes[1] = 0xFFFFFFFF;
961 } else {
962 i = 1;
35
36/*
37 * Texas Instruments ThunderLAN driver for FreeBSD 2.2.6 and 3.x.
38 * Supports many Compaq PCI NICs based on the ThunderLAN ethernet controller,
39 * the National Semiconductor DP83840A physical interface and the
40 * Microchip Technology 24Cxx series serial EEPROM.
41 *
42 * Written using the following four documents:

--- 912 unchanged lines hidden (view full) ---

955 tl_dio_write32(sc, TL_HASH2, 0);
956
957 /* Now program new ones. */
958 if (ifp->if_flags & IFF_ALLMULTI) {
959 hashes[0] = 0xFFFFFFFF;
960 hashes[1] = 0xFFFFFFFF;
961 } else {
962 i = 1;
963 IF_ADDR_LOCK(ifp);
963 TAILQ_FOREACH_REVERSE(ifma, &ifp->if_multiaddrs, ifmultihead, ifma_link) {
964 if (ifma->ifma_addr->sa_family != AF_LINK)
965 continue;
966 /*
967 * Program the first three multicast groups
968 * into the perfect filter. For all others,
969 * use the hash table.
970 */

--- 6 unchanged lines hidden (view full) ---

977
978 h = tl_mchash(
979 LLADDR((struct sockaddr_dl *)ifma->ifma_addr));
980 if (h < 32)
981 hashes[0] |= (1 << h);
982 else
983 hashes[1] |= (1 << (h - 32));
984 }
964 TAILQ_FOREACH_REVERSE(ifma, &ifp->if_multiaddrs, ifmultihead, ifma_link) {
965 if (ifma->ifma_addr->sa_family != AF_LINK)
966 continue;
967 /*
968 * Program the first three multicast groups
969 * into the perfect filter. For all others,
970 * use the hash table.
971 */

--- 6 unchanged lines hidden (view full) ---

978
979 h = tl_mchash(
980 LLADDR((struct sockaddr_dl *)ifma->ifma_addr));
981 if (h < 32)
982 hashes[0] |= (1 << h);
983 else
984 hashes[1] |= (1 << (h - 32));
985 }
986 IF_ADDR_UNLOCK(ifp);
985 }
986
987 tl_dio_write32(sc, TL_HASH1, hashes[0]);
988 tl_dio_write32(sc, TL_HASH2, hashes[1]);
989
990 return;
991}
992

--- 1362 unchanged lines hidden ---
987 }
988
989 tl_dio_write32(sc, TL_HASH1, hashes[0]);
990 tl_dio_write32(sc, TL_HASH2, hashes[1]);
991
992 return;
993}
994

--- 1362 unchanged lines hidden ---