Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Apply deferred if_start to more MD drivers.



details:   https://anonhg.NetBSD.org/src/rev/daf568282fe8
branches:  trunk
changeset: 821930:daf568282fe8
user:      nonaka <nonaka%NetBSD.org@localhost>
date:      Wed Feb 22 09:45:15 2017 +0000

description:
Apply deferred if_start to more MD drivers.

diffstat:

 sys/arch/acorn32/podulebus/if_ie.c  |  7 ++++---
 sys/arch/amiga/dev/if_es.c          |  7 ++++---
 sys/arch/amiga/dev/if_qn.c          |  9 +++++----
 sys/arch/arm/ep93xx/epe.c           |  7 ++++---
 sys/arch/arm/xscale/ixp425_if_npe.c |  7 ++++---
 sys/arch/mac68k/dev/if_mc.c         |  7 ++++---
 sys/arch/macppc/dev/am79c950.c      |  7 ++++---
 sys/arch/newsmips/apbus/if_sn.c     |  7 ++++---
 sys/arch/sun3/dev/if_ie.c           |  7 ++++---
 9 files changed, 37 insertions(+), 28 deletions(-)

diffs (truncated from 324 to 300 lines):

diff -r 7b260bbedfbe -r daf568282fe8 sys/arch/acorn32/podulebus/if_ie.c
--- a/sys/arch/acorn32/podulebus/if_ie.c        Wed Feb 22 09:20:39 2017 +0000
+++ b/sys/arch/acorn32/podulebus/if_ie.c        Wed Feb 22 09:45:15 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ie.c,v 1.38 2016/12/15 09:28:02 ozaki-r Exp $ */
+/* $NetBSD: if_ie.c,v 1.39 2017/02/22 09:45:15 nonaka Exp $ */
 
 /*
  * Copyright (c) 1995 Melvin Tang-Richardson.
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.38 2016/12/15 09:28:02 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.39 2017/02/22 09:45:15 nonaka Exp $");
 
 #define IGNORE_ETHER1_IDROM_CHECKSUM
 
@@ -452,6 +452,7 @@
        
        /* Signed, dated then sent */
         if_attach (ifp);
+       if_deferred_start_init(ifp, NULL);
        ether_ifattach(ifp, hwaddr);
 
        /* "Hmm," said nuts, "what if the attach fails" */
@@ -1555,7 +1556,7 @@
     if ( sc->xmit_free<NTXBUF )
        iexmit(sc);
 
-    iestart(ifp);
+    if_schedule_deferred_start(ifp);
 }
 
 /* End of if_ie.c */
diff -r 7b260bbedfbe -r daf568282fe8 sys/arch/amiga/dev/if_es.c
--- a/sys/arch/amiga/dev/if_es.c        Wed Feb 22 09:20:39 2017 +0000
+++ b/sys/arch/amiga/dev/if_es.c        Wed Feb 22 09:45:15 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_es.c,v 1.56 2016/12/15 09:28:02 ozaki-r Exp $ */
+/*     $NetBSD: if_es.c,v 1.57 2017/02/22 09:45:15 nonaka Exp $ */
 
 /*
  * Copyright (c) 1995 Michael L. Hitch
@@ -33,7 +33,7 @@
 #include "opt_ns.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_es.c,v 1.56 2016/12/15 09:28:02 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_es.c,v 1.57 2017/02/22 09:45:15 nonaka Exp $");
 
 
 #include <sys/param.h>
@@ -185,6 +185,7 @@
 
        /* Attach the interface. */
        if_attach(ifp);
+       if_deferred_start_init(ifp, NULL);
        ether_ifattach(ifp, myaddr);
 
        /* Print additional info when attached. */
@@ -292,7 +293,7 @@
        ifp->if_flags &= ~IFF_OACTIVE;
 
        /* Attempt to start output, if any. */
-       esstart(ifp);
+       if_schedule_deferred_start(ifp);
 
        splx(s);
 }
diff -r 7b260bbedfbe -r daf568282fe8 sys/arch/amiga/dev/if_qn.c
--- a/sys/arch/amiga/dev/if_qn.c        Wed Feb 22 09:20:39 2017 +0000
+++ b/sys/arch/amiga/dev/if_qn.c        Wed Feb 22 09:45:15 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_qn.c,v 1.43 2016/12/15 09:28:02 ozaki-r Exp $ */
+/*     $NetBSD: if_qn.c,v 1.44 2017/02/22 09:45:15 nonaka Exp $ */
 
 /*
  * Copyright (c) 1995 Mika Kortelainen
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_qn.c,v 1.43 2016/12/15 09:28:02 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_qn.c,v 1.44 2017/02/22 09:45:15 nonaka Exp $");
 
 #include "qn.h"
 #if NQN > 0
@@ -237,6 +237,7 @@
 
        /* Attach the interface. */
        if_attach(ifp);
+       if_deferred_start_init(ifp, NULL);
        ether_ifattach(ifp, myaddr);
 
 #ifdef QN_DEBUG
@@ -292,7 +293,7 @@
        *sc->nic_reset = ENABLE_DLC;
 
        /* Attempt to start output, if any. */
-       qnstart(ifp);
+       if_schedule_deferred_start(ifp);
 }
 
 /*
@@ -779,7 +780,7 @@
                qn_rint(sc, rint);
 
        if ((sc->sc_ethercom.ec_if.if_flags & IFF_OACTIVE) == 0)
-               qnstart(&sc->sc_ethercom.ec_if);
+               if_schedule_deferred_start(&sc->sc_ethercom.ec_if);
        else if (return_tintmask == 1)
                *sc->nic_t_mask = tintmask;
 
diff -r 7b260bbedfbe -r daf568282fe8 sys/arch/arm/ep93xx/epe.c
--- a/sys/arch/arm/ep93xx/epe.c Wed Feb 22 09:20:39 2017 +0000
+++ b/sys/arch/arm/ep93xx/epe.c Wed Feb 22 09:45:15 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: epe.c,v 1.35 2016/12/15 09:28:02 ozaki-r Exp $ */
+/*     $NetBSD: epe.c,v 1.36 2017/02/22 09:45:15 nonaka Exp $  */
 
 /*
  * Copyright (c) 2004 Jesse Off
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: epe.c,v 1.35 2016/12/15 09:28:02 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: epe.c,v 1.36 2017/02/22 09:45:15 nonaka Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -271,7 +271,7 @@
        }
 
        if (epe_gctx(sc) > 0 && IFQ_IS_EMPTY(&ifp->if_snd) == 0) {
-               epe_ifstart(ifp);
+               if_schedule_deferred_start(ifp);
        } 
 
        irq = EPE_READ(IntStsC);
@@ -441,6 +441,7 @@
        ifp->if_softc = sc;
         IFQ_SET_READY(&ifp->if_snd);
         if_attach(ifp);
+       if_deferred_start_init(ifp, NULL);
         ether_ifattach(ifp, (sc)->sc_enaddr);
 }
 
diff -r 7b260bbedfbe -r daf568282fe8 sys/arch/arm/xscale/ixp425_if_npe.c
--- a/sys/arch/arm/xscale/ixp425_if_npe.c       Wed Feb 22 09:20:39 2017 +0000
+++ b/sys/arch/arm/xscale/ixp425_if_npe.c       Wed Feb 22 09:45:15 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ixp425_if_npe.c,v 1.32 2016/12/15 09:28:02 ozaki-r Exp $ */
+/*     $NetBSD: ixp425_if_npe.c,v 1.33 2017/02/22 09:45:16 nonaka Exp $ */
 
 /*-
  * Copyright (c) 2006 Sam Leffler.  All rights reserved.
@@ -28,7 +28,7 @@
 #if 0
 __FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/if_npe.c,v 1.1 2006/11/19 23:55:23 sam Exp $");
 #endif
-__KERNEL_RCSID(0, "$NetBSD: ixp425_if_npe.c,v 1.32 2016/12/15 09:28:02 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixp425_if_npe.c,v 1.33 2017/02/22 09:45:16 nonaka Exp $");
 
 /*
  * Intel XScale NPE Ethernet driver.
@@ -332,6 +332,7 @@
        sc->sc_ethercom.ec_capabilities |= ETHERCAP_VLAN_MTU;
 
        if_attach(ifp);
+       if_deferred_start_init(ifp, NULL);
        ether_ifattach(ifp, sc->sc_enaddr);
        rnd_attach_source(&sc->rnd_source, device_xname(sc->sc_dev),
            RND_TYPE_NET, RND_FLAG_DEFAULT);
@@ -811,7 +812,7 @@
        ifp->if_opackets += td->count;
        ifp->if_flags &= ~IFF_OACTIVE;
        ifp->if_timer = 0;
-       npestart(ifp);
+       if_schedule_deferred_start(ifp);
 }
 
 /*
diff -r 7b260bbedfbe -r daf568282fe8 sys/arch/mac68k/dev/if_mc.c
--- a/sys/arch/mac68k/dev/if_mc.c       Wed Feb 22 09:20:39 2017 +0000
+++ b/sys/arch/mac68k/dev/if_mc.c       Wed Feb 22 09:45:15 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_mc.c,v 1.44 2016/12/15 09:28:03 ozaki-r Exp $       */
+/*     $NetBSD: if_mc.c,v 1.45 2017/02/22 09:45:16 nonaka Exp $        */
 
 /*-
  * Copyright (c) 1997 David Huang <khym%azeotrope.org@localhost>
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mc.c,v 1.44 2016/12/15 09:28:03 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mc.c,v 1.45 2017/02/22 09:45:16 nonaka Exp $");
 
 #include "opt_ddb.h"
 #include "opt_inet.h"
@@ -160,6 +160,7 @@
        ifp->if_watchdog = mcwatchdog;
 
        if_attach(ifp);
+       if_deferred_start_init(ifp, NULL);
        ether_ifattach(ifp, lladdr);
 
        return (0);
@@ -510,7 +511,7 @@
 
        sc->sc_if.if_flags &= ~IFF_OACTIVE;
        sc->sc_if.if_timer = 0;
-       mcstart(&sc->sc_if);
+       if_schedule_deferred_start(&sc->sc_if);
 }
 
 void
diff -r 7b260bbedfbe -r daf568282fe8 sys/arch/macppc/dev/am79c950.c
--- a/sys/arch/macppc/dev/am79c950.c    Wed Feb 22 09:20:39 2017 +0000
+++ b/sys/arch/macppc/dev/am79c950.c    Wed Feb 22 09:45:15 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: am79c950.c,v 1.37 2016/12/15 09:28:03 ozaki-r Exp $    */
+/*     $NetBSD: am79c950.c,v 1.38 2017/02/22 09:45:16 nonaka Exp $     */
 
 /*-
  * Copyright (c) 1997 David Huang <khym%bga.com@localhost>
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: am79c950.c,v 1.37 2016/12/15 09:28:03 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: am79c950.c,v 1.38 2017/02/22 09:45:16 nonaka Exp $");
 
 #include "opt_inet.h"
 
@@ -163,6 +163,7 @@
        ifmedia_set(&sc->sc_media, IFM_ETHER|IFM_MANUAL);
 
        if_attach(ifp);
+       if_deferred_start_init(ifp, NULL);
        ether_ifattach(ifp, lladdr);
 
        return (0);
@@ -522,7 +523,7 @@
 
        sc->sc_if.if_flags &= ~IFF_OACTIVE;
        sc->sc_if.if_timer = 0;
-       mcstart(&sc->sc_if);
+       if_schedule_deferred_start(&sc->sc_if);
 }
 
 void
diff -r 7b260bbedfbe -r daf568282fe8 sys/arch/newsmips/apbus/if_sn.c
--- a/sys/arch/newsmips/apbus/if_sn.c   Wed Feb 22 09:20:39 2017 +0000
+++ b/sys/arch/newsmips/apbus/if_sn.c   Wed Feb 22 09:45:15 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_sn.c,v 1.37 2016/12/15 09:28:03 ozaki-r Exp $       */
+/*     $NetBSD: if_sn.c,v 1.38 2017/02/22 09:45:16 nonaka Exp $        */
 
 /*
  * National Semiconductor  DP8393X SONIC Driver
@@ -16,7 +16,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_sn.c,v 1.37 2016/12/15 09:28:03 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_sn.c,v 1.38 2017/02/22 09:45:16 nonaka Exp $");
 
 #include "opt_inet.h"
 
@@ -216,6 +216,7 @@
            IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST;
        ifp->if_watchdog = snwatchdog;
        if_attach(ifp);
+       if_deferred_start_init(ifp, NULL);
        ether_ifattach(ifp, lladdr);
 
        return 0;
@@ -858,7 +859,7 @@
                                sc->sc_mptally++;
 #endif
                }
-               snstart(&sc->sc_if);
+               if_schedule_deferred_start(&sc->sc_if);
        }
        return handled;
 }
diff -r 7b260bbedfbe -r daf568282fe8 sys/arch/sun3/dev/if_ie.c
--- a/sys/arch/sun3/dev/if_ie.c Wed Feb 22 09:20:39 2017 +0000
+++ b/sys/arch/sun3/dev/if_ie.c Wed Feb 22 09:45:15 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ie.c,v 1.61 2016/12/15 09:28:04 ozaki-r Exp $ */
+/*     $NetBSD: if_ie.c,v 1.62 2017/02/22 09:45:16 nonaka Exp $ */
 
 /*-
  * Copyright (c) 1993, 1994, 1995 Charles M. Hannum.
@@ -98,7 +98,7 @@
 */



Home | Main Index | Thread Index | Old Index