Deleted Added
full compact
if_sf.c (147291) if_sf.c (148654)
1/*-
2 * Copyright (c) 1997, 1998, 1999
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, 1999
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/dev/sf/if_sf.c 147291 2005-06-11 01:37:46Z brooks $");
34__FBSDID("$FreeBSD: head/sys/dev/sf/if_sf.c 148654 2005-08-03 00:18:35Z rwatson $");
35
36/*
37 * Adaptec AIC-6915 "Starfire" PCI fast ethernet driver for FreeBSD.
38 * Programming manual is available from:
39 * http://download.adaptec.com/pdfs/user_guides/aic6915_pg.pdf.
40 *
41 * Written by Bill Paul <wpaul@ctr.columbia.edu>
42 * Department of Electical Engineering

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

426 csr_write_4(sc, i, 0);
427 SF_CLRBIT(sc, SF_RXFILT, SF_RXFILT_ALLMULTI);
428
429 /* Now program new ones. */
430 if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) {
431 SF_SETBIT(sc, SF_RXFILT, SF_RXFILT_ALLMULTI);
432 } else {
433 i = 1;
35
36/*
37 * Adaptec AIC-6915 "Starfire" PCI fast ethernet driver for FreeBSD.
38 * Programming manual is available from:
39 * http://download.adaptec.com/pdfs/user_guides/aic6915_pg.pdf.
40 *
41 * Written by Bill Paul <wpaul@ctr.columbia.edu>
42 * Department of Electical Engineering

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

426 csr_write_4(sc, i, 0);
427 SF_CLRBIT(sc, SF_RXFILT, SF_RXFILT_ALLMULTI);
428
429 /* Now program new ones. */
430 if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) {
431 SF_SETBIT(sc, SF_RXFILT, SF_RXFILT_ALLMULTI);
432 } else {
433 i = 1;
434 IF_ADDR_LOCK(ifp);
434 TAILQ_FOREACH_REVERSE(ifma, &ifp->if_multiaddrs, ifmultihead, ifma_link) {
435 if (ifma->ifma_addr->sa_family != AF_LINK)
436 continue;
437 /*
438 * Program the first 15 multicast groups
439 * into the perfect filter. For all others,
440 * use the hash table.
441 */
442 if (i < SF_RXFILT_PERFECT_CNT) {
443 sf_setperf(sc, i,
444 LLADDR((struct sockaddr_dl *)ifma->ifma_addr));
445 i++;
446 continue;
447 }
448
449 sf_sethash(sc,
450 LLADDR((struct sockaddr_dl *)ifma->ifma_addr), 0);
451 }
435 TAILQ_FOREACH_REVERSE(ifma, &ifp->if_multiaddrs, ifmultihead, ifma_link) {
436 if (ifma->ifma_addr->sa_family != AF_LINK)
437 continue;
438 /*
439 * Program the first 15 multicast groups
440 * into the perfect filter. For all others,
441 * use the hash table.
442 */
443 if (i < SF_RXFILT_PERFECT_CNT) {
444 sf_setperf(sc, i,
445 LLADDR((struct sockaddr_dl *)ifma->ifma_addr));
446 i++;
447 continue;
448 }
449
450 sf_sethash(sc,
451 LLADDR((struct sockaddr_dl *)ifma->ifma_addr), 0);
452 }
453 IF_ADDR_UNLOCK(ifp);
452 }
453}
454
455/*
456 * Set media options.
457 */
458static int
459sf_ifmedia_upd(ifp)

--- 1109 unchanged lines hidden ---
454 }
455}
456
457/*
458 * Set media options.
459 */
460static int
461sf_ifmedia_upd(ifp)

--- 1109 unchanged lines hidden ---