Deleted Added
full compact
if_vge.c (147291) if_vge.c (148654)
1/*-
2 * Copyright (c) 2004
3 * Bill Paul <wpaul@windriver.com>. 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) 2004
3 * Bill Paul <wpaul@windriver.com>. 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/vge/if_vge.c 147291 2005-06-11 01:37:46Z brooks $");
34__FBSDID("$FreeBSD: head/sys/dev/vge/if_vge.c 148654 2005-08-03 00:18:35Z rwatson $");
35
36/*
37 * VIA Networking Technologies VT612x PCI gigabit ethernet NIC driver.
38 *
39 * Written by Bill Paul <wpaul@windriver.com>
40 * Senior Networking Software Engineer
41 * Wind River Systems
42 */

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

589 */
590 if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) {
591 CSR_WRITE_4(sc, VGE_MAR0, 0xFFFFFFFF);
592 CSR_WRITE_4(sc, VGE_MAR1, 0xFFFFFFFF);
593 return;
594 }
595
596 /* Now program new ones */
35
36/*
37 * VIA Networking Technologies VT612x PCI gigabit ethernet NIC driver.
38 *
39 * Written by Bill Paul <wpaul@windriver.com>
40 * Senior Networking Software Engineer
41 * Wind River Systems
42 */

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

589 */
590 if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) {
591 CSR_WRITE_4(sc, VGE_MAR0, 0xFFFFFFFF);
592 CSR_WRITE_4(sc, VGE_MAR1, 0xFFFFFFFF);
593 return;
594 }
595
596 /* Now program new ones */
597 IF_ADDR_LOCK(ifp);
597 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
598 if (ifma->ifma_addr->sa_family != AF_LINK)
599 continue;
600 error = vge_cam_set(sc,
601 LLADDR((struct sockaddr_dl *)ifma->ifma_addr));
602 if (error)
603 break;
604 }

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

621 hashes[0] |= (1 << h);
622 else
623 hashes[1] |= (1 << (h - 32));
624 }
625
626 CSR_WRITE_4(sc, VGE_MAR0, hashes[0]);
627 CSR_WRITE_4(sc, VGE_MAR1, hashes[1]);
628 }
598 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
599 if (ifma->ifma_addr->sa_family != AF_LINK)
600 continue;
601 error = vge_cam_set(sc,
602 LLADDR((struct sockaddr_dl *)ifma->ifma_addr));
603 if (error)
604 break;
605 }

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

622 hashes[0] |= (1 << h);
623 else
624 hashes[1] |= (1 << (h - 32));
625 }
626
627 CSR_WRITE_4(sc, VGE_MAR0, hashes[0]);
628 CSR_WRITE_4(sc, VGE_MAR1, hashes[1]);
629 }
630 IF_ADDR_UNLOCK(ifp);
629
630 return;
631}
632
633static void
634vge_reset(sc)
635 struct vge_softc *sc;
636{

--- 1799 unchanged lines hidden ---
631
632 return;
633}
634
635static void
636vge_reset(sc)
637 struct vge_softc *sc;
638{

--- 1799 unchanged lines hidden ---