dp83932.c (147316) | dp83932.c (148654) |
---|---|
1/* $FreeBSD: head/sys/dev/snc/dp83932.c 147316 2005-06-12 15:25:19Z scottl $ */ | 1/* $FreeBSD: head/sys/dev/snc/dp83932.c 148654 2005-08-03 00:18:35Z rwatson $ */ |
2/* $NecBSD: dp83932.c,v 1.5 1999/07/29 05:08:44 kmatsuda Exp $ */ 3/* $NetBSD: if_snc.c,v 1.18 1998/04/25 21:27:40 scottr Exp $ */ 4 5/*- 6 * Copyright (c) 1997, 1998, 1999 7 * Kouichi Matsuda. All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without --- 660 unchanged lines hidden (view full) --- 670 /* Always load our own address first. */ 671 camentry (sc, mcount, IFP2ENADDR(sc->sc_ifp)); 672 mcount++; 673 674 /* Assume we won't need allmulti bit. */ 675 ifp->if_flags &= ~IFF_ALLMULTI; 676 677 /* Loop through multicast addresses */ | 2/* $NecBSD: dp83932.c,v 1.5 1999/07/29 05:08:44 kmatsuda Exp $ */ 3/* $NetBSD: if_snc.c,v 1.18 1998/04/25 21:27:40 scottr Exp $ */ 4 5/*- 6 * Copyright (c) 1997, 1998, 1999 7 * Kouichi Matsuda. All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without --- 660 unchanged lines hidden (view full) --- 670 /* Always load our own address first. */ 671 camentry (sc, mcount, IFP2ENADDR(sc->sc_ifp)); 672 mcount++; 673 674 /* Assume we won't need allmulti bit. */ 675 ifp->if_flags &= ~IFF_ALLMULTI; 676 677 /* Loop through multicast addresses */ |
678 IF_ADDR_LOCK(ifp); |
|
678 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { 679 if (ifma->ifma_addr->sa_family != AF_LINK) 680 continue; 681 if (mcount == MAXCAM) { 682 ifp->if_flags |= IFF_ALLMULTI; 683 break; 684 } 685 686 /* program the CAM with the specified entry */ 687 camentry(sc, mcount, 688 LLADDR((struct sockaddr_dl *)ifma->ifma_addr)); 689 mcount++; 690 } | 679 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { 680 if (ifma->ifma_addr->sa_family != AF_LINK) 681 continue; 682 if (mcount == MAXCAM) { 683 ifp->if_flags |= IFF_ALLMULTI; 684 break; 685 } 686 687 /* program the CAM with the specified entry */ 688 camentry(sc, mcount, 689 LLADDR((struct sockaddr_dl *)ifma->ifma_addr)); 690 mcount++; 691 } |
692 IF_ADDR_UNLOCK(ifp); |
|
691 692 NIC_PUT(sc, SNCR_CDP, LOWER(sc->v_cda)); 693 NIC_PUT(sc, SNCR_CDC, MAXCAM); 694 NIC_PUT(sc, SNCR_CR, CR_LCAM); 695 wbflush(); 696 697 timeout = 10000; 698 while ((NIC_GET(sc, SNCR_CR) & CR_LCAM) && timeout--) --- 519 unchanged lines hidden --- | 693 694 NIC_PUT(sc, SNCR_CDP, LOWER(sc->v_cda)); 695 NIC_PUT(sc, SNCR_CDC, MAXCAM); 696 NIC_PUT(sc, SNCR_CR, CR_LCAM); 697 wbflush(); 698 699 timeout = 10000; 700 while ((NIC_GET(sc, SNCR_CR) & CR_LCAM) && timeout--) --- 519 unchanged lines hidden --- |