if_sk.c (71999) | if_sk.c (72084) |
---|---|
1/* 2 * Copyright (c) 1997, 1998, 1999, 2000 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 --- 15 unchanged lines hidden (view full) --- 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 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 * | 1/* 2 * Copyright (c) 1997, 1998, 1999, 2000 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 --- 15 unchanged lines hidden (view full) --- 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 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 * $FreeBSD: head/sys/dev/sk/if_sk.c 71999 2001-02-04 13:13:25Z phk $ | 32 * $FreeBSD: head/sys/dev/sk/if_sk.c 72084 2001-02-06 10:12:15Z phk $ |
33 */ 34 35/* 36 * SysKonnect SK-NET gigabit ethernet driver for FreeBSD. Supports 37 * the SK-984x series adapters, both single port and dual port. 38 * References: 39 * The XaQti XMAC II datasheet, 40 * http://www.freebsd.org/~wpaul/SysKonnect/xmacii_datasheet_rev_c_9-29.pdf --- 67 unchanged lines hidden (view full) --- 108 109MODULE_DEPEND(sk, miibus, 1, 1, 1); 110 111/* "controller miibus0" required. See GENERIC if you get errors here. */ 112#include "miibus_if.h" 113 114#ifndef lint 115static const char rcsid[] = | 33 */ 34 35/* 36 * SysKonnect SK-NET gigabit ethernet driver for FreeBSD. Supports 37 * the SK-984x series adapters, both single port and dual port. 38 * References: 39 * The XaQti XMAC II datasheet, 40 * http://www.freebsd.org/~wpaul/SysKonnect/xmacii_datasheet_rev_c_9-29.pdf --- 67 unchanged lines hidden (view full) --- 108 109MODULE_DEPEND(sk, miibus, 1, 1, 1); 110 111/* "controller miibus0" required. See GENERIC if you get errors here. */ 112#include "miibus_if.h" 113 114#ifndef lint 115static const char rcsid[] = |
116 "$FreeBSD: head/sys/dev/sk/if_sk.c 71999 2001-02-04 13:13:25Z phk $"; | 116 "$FreeBSD: head/sys/dev/sk/if_sk.c 72084 2001-02-06 10:12:15Z phk $"; |
117#endif 118 119static struct sk_type sk_devs[] = { 120 { SK_VENDORID, SK_DEVICEID_GE, "SysKonnect Gigabit Ethernet" }, 121 { 0, 0, NULL } 122}; 123 124static int sk_probe __P((device_t)); --- 427 unchanged lines hidden (view full) --- 552 SK_XM_WRITE_4(sc_if, XM_MAR2, 0); 553 554 /* Now program new ones. */ 555 if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) { 556 hashes[0] = 0xFFFFFFFF; 557 hashes[1] = 0xFFFFFFFF; 558 } else { 559 i = 1; | 117#endif 118 119static struct sk_type sk_devs[] = { 120 { SK_VENDORID, SK_DEVICEID_GE, "SysKonnect Gigabit Ethernet" }, 121 { 0, 0, NULL } 122}; 123 124static int sk_probe __P((device_t)); --- 427 unchanged lines hidden (view full) --- 552 SK_XM_WRITE_4(sc_if, XM_MAR2, 0); 553 554 /* Now program new ones. */ 555 if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) { 556 hashes[0] = 0xFFFFFFFF; 557 hashes[1] = 0xFFFFFFFF; 558 } else { 559 i = 1; |
560 /* First find the tail of the list. */ 561 LIST_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { 562 if (LIST_NEXT(ifma, ifma_link) == NULL) 563 break; 564 } 565 /* Now traverse the list backwards. */ 566 for (; ifma != NULL && ifma != (void *)&ifp->if_multiaddrs; 567 ifma = (struct ifmultiaddr *)ifma->ifma_link.le_prev) { | 560 TAILQ_FOREACH_REVERSE(ifma, &ifp->if_multiaddrs, ifmultihead, ifma_link) { |
568 if (ifma->ifma_addr->sa_family != AF_LINK) 569 continue; 570 /* 571 * Program the first XM_RXFILT_MAX multicast groups 572 * into the perfect filter. For all others, 573 * use the hash table. 574 */ 575 if (i < XM_RXFILT_MAX) { --- 1660 unchanged lines hidden --- | 561 if (ifma->ifma_addr->sa_family != AF_LINK) 562 continue; 563 /* 564 * Program the first XM_RXFILT_MAX multicast groups 565 * into the perfect filter. For all others, 566 * use the hash table. 567 */ 568 if (i < XM_RXFILT_MAX) { --- 1660 unchanged lines hidden --- |