Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys Pull up following revision(s) (requested by ozaki-r i...



details:   https://anonhg.NetBSD.org/src/rev/51257e5887a4
branches:  netbsd-8
changeset: 435019:51257e5887a4
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Jun 07 17:42:24 2018 +0000

description:
Pull up following revision(s) (requested by ozaki-r in ticket #843):

        sys/dev/pci/ixgbe/ixv.c: revision 1.101
        sys/net/if_bridge.c: revision 1.156
        sys/net/if_pppoe.c: revision 1.138
        sys/dev/pci/if_wm.c: revision 1.580
        sys/dev/pci/ixgbe/ixgbe.c: revision 1.156
        sys/net/if_gif.c: revision 1.142

Ensure to call if_register after interface initializations finish

diffstat:

 sys/dev/pci/if_wm.c       |  6 +++---
 sys/dev/pci/ixgbe/ixgbe.c |  5 +++--
 sys/dev/pci/ixgbe/ixv.c   |  5 +++--
 sys/net/if_bridge.c       |  7 +++----
 sys/net/if_gif.c          |  6 +++---
 sys/net/if_pppoe.c        |  6 +++---
 6 files changed, 18 insertions(+), 17 deletions(-)

diffs (171 lines):

diff -r 6fc62e97a8be -r 51257e5887a4 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Thu Jun 07 16:25:06 2018 +0000
+++ b/sys/dev/pci/if_wm.c       Thu Jun 07 17:42:24 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.508.4.19 2018/05/17 13:58:07 martin Exp $  */
+/*     $NetBSD: if_wm.c,v 1.508.4.20 2018/06/07 17:42:25 martin Exp $  */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -83,7 +83,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.508.4.19 2018/05/17 13:58:07 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.508.4.20 2018/06/07 17:42:25 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -2825,8 +2825,8 @@
        }
        sc->sc_ipq = if_percpuq_create(&sc->sc_ethercom.ec_if);
        ether_ifattach(ifp, enaddr);
+       ether_set_ifflags_cb(&sc->sc_ethercom, wm_ifflags_cb);
        if_register(ifp);
-       ether_set_ifflags_cb(&sc->sc_ethercom, wm_ifflags_cb);
        rnd_attach_source(&sc->rnd_source, xname, RND_TYPE_NET,
                          RND_FLAG_DEFAULT);
 
diff -r 6fc62e97a8be -r 51257e5887a4 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Thu Jun 07 16:25:06 2018 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Thu Jun 07 17:42:24 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.88.2.18 2018/04/17 08:20:06 martin Exp $ */
+/* $NetBSD: ixgbe.c,v 1.88.2.19 2018/06/07 17:42:24 martin Exp $ */
 
 /******************************************************************************
 
@@ -1311,7 +1311,6 @@
         * We use per TX queue softint, so if_deferred_start_init() isn't
         * used.
         */
-       if_register(ifp);
        ether_set_ifflags_cb(ec, ixgbe_ifflags_cb);
 
        adapter->max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;
@@ -1360,6 +1359,8 @@
        /* Set autoselect media by default */
        ifmedia_set(&adapter->media, IFM_ETHER | IFM_AUTO);
 
+       if_register(ifp);
+
        return (0);
 } /* ixgbe_setup_interface */
 
diff -r 6fc62e97a8be -r 51257e5887a4 sys/dev/pci/ixgbe/ixv.c
--- a/sys/dev/pci/ixgbe/ixv.c   Thu Jun 07 16:25:06 2018 +0000
+++ b/sys/dev/pci/ixgbe/ixv.c   Thu Jun 07 17:42:24 2018 +0000
@@ -1,4 +1,4 @@
-/*$NetBSD: ixv.c,v 1.56.2.15 2018/05/15 13:37:24 martin Exp $*/
+/*$NetBSD: ixv.c,v 1.56.2.16 2018/06/07 17:42:24 martin Exp $*/
 
 /******************************************************************************
 
@@ -1526,7 +1526,6 @@
         * We use per TX queue softint, so if_deferred_start_init() isn't
         * used.
         */
-       if_register(ifp);
        ether_set_ifflags_cb(ec, ixv_ifflags_cb);
 
        adapter->max_frame_size = ifp->if_mtu + IXGBE_MTU_HDR;
@@ -1565,6 +1564,8 @@
        ifmedia_add(&adapter->media, IFM_ETHER | IFM_AUTO, 0, NULL);
        ifmedia_set(&adapter->media, IFM_ETHER | IFM_AUTO);
 
+       if_register(ifp);
+
        return 0;
 } /* ixv_setup_interface */
 
diff -r 6fc62e97a8be -r 51257e5887a4 sys/net/if_bridge.c
--- a/sys/net/if_bridge.c       Thu Jun 07 16:25:06 2018 +0000
+++ b/sys/net/if_bridge.c       Thu Jun 07 17:42:24 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bridge.c,v 1.134.6.10 2018/05/15 13:48:37 martin Exp $      */
+/*     $NetBSD: if_bridge.c,v 1.134.6.11 2018/06/07 17:42:25 martin Exp $      */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -80,7 +80,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.134.6.10 2018/05/15 13:48:37 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.134.6.11 2018/06/07 17:42:25 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_bridge_ipf.h"
@@ -470,10 +470,9 @@
 
                return error;
        }
+       if_alloc_sadl(ifp);
        if_register(ifp);
 
-       if_alloc_sadl(ifp);
-
        return 0;
 }
 
diff -r 6fc62e97a8be -r 51257e5887a4 sys/net/if_gif.c
--- a/sys/net/if_gif.c  Thu Jun 07 16:25:06 2018 +0000
+++ b/sys/net/if_gif.c  Thu Jun 07 17:42:24 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_gif.c,v 1.126.2.10 2018/05/17 14:07:03 martin Exp $ */
+/*     $NetBSD: if_gif.c,v 1.126.2.11 2018/06/07 17:42:25 martin Exp $ */
 /*     $KAME: if_gif.c,v 1.76 2001/08/20 02:01:02 kjc Exp $    */
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.126.2.10 2018/05/17 14:07:03 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.126.2.11 2018/06/07 17:42:25 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -308,9 +308,9 @@
        if (rv != 0)
                return rv;
 
-       if_register(&sc->gif_if);
        if_alloc_sadl(&sc->gif_if);
        bpf_attach(&sc->gif_if, DLT_NULL, sizeof(u_int));
+       if_register(&sc->gif_if);
        return 0;
 }
 
diff -r 6fc62e97a8be -r 51257e5887a4 sys/net/if_pppoe.c
--- a/sys/net/if_pppoe.c        Thu Jun 07 16:25:06 2018 +0000
+++ b/sys/net/if_pppoe.c        Thu Jun 07 17:42:24 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_pppoe.c,v 1.125.6.7 2018/04/18 14:16:57 martin Exp $ */
+/* $NetBSD: if_pppoe.c,v 1.125.6.8 2018/06/07 17:42:25 martin Exp $ */
 
 /*-
  * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.125.6.7 2018/04/18 14:16:57 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.125.6.8 2018/06/07 17:42:25 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "pppoe.h"
@@ -336,12 +336,12 @@
        }
        sc->sc_sppp.pp_if.if_percpuq = if_percpuq_create(&sc->sc_sppp.pp_if);
        sppp_attach(&sc->sc_sppp.pp_if);
-       if_register(&sc->sc_sppp.pp_if);
 
        bpf_attach(&sc->sc_sppp.pp_if, DLT_PPP_ETHER, 0);
        if (LIST_EMPTY(&pppoe_softc_list)) {
                pfil_add_ihook(pppoe_ifattach_hook, NULL, PFIL_IFNET, if_pfil);
        }
+       if_register(&sc->sc_sppp.pp_if);
 
        rw_init(&sc->sc_lock);
 



Home | Main Index | Thread Index | Old Index