Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/booke/dev IFQ_PURGE() must be called only a...



details:   https://anonhg.NetBSD.org/src/rev/8696a65dfc17
branches:  trunk
changeset: 816797:8696a65dfc17
user:      nonaka <nonaka%NetBSD.org@localhost>
date:      Tue Jul 26 01:36:50 2016 +0000

description:
IFQ_PURGE() must be called only after call if_initialize().
it lock ifp->if_snd.ifq_lock.

diffstat:

 sys/arch/powerpc/booke/dev/pq3etsec.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 48aaafc7bb93 -r 8696a65dfc17 sys/arch/powerpc/booke/dev/pq3etsec.c
--- a/sys/arch/powerpc/booke/dev/pq3etsec.c     Mon Jul 25 23:46:09 2016 +0000
+++ b/sys/arch/powerpc/booke/dev/pq3etsec.c     Tue Jul 26 01:36:50 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pq3etsec.c,v 1.27 2016/06/10 13:27:12 ozaki-r Exp $    */
+/*     $NetBSD: pq3etsec.c,v 1.28 2016/07/26 01:36:50 nonaka Exp $     */
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -41,7 +41,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.27 2016/06/10 13:27:12 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.28 2016/07/26 01:36:50 nonaka Exp $");
 
 #include <sys/param.h>
 #include <sys/cpu.h>
@@ -791,8 +791,6 @@
        ifp->if_stop = pq3etsec_ifstop;
        IFQ_SET_READY(&ifp->if_snd);
 
-       pq3etsec_ifstop(ifp, true);
-
        /*
         * Attach the interface.
         */
@@ -800,6 +798,8 @@
        ether_ifattach(ifp, enaddr);
        if_register(ifp);
 
+       pq3etsec_ifstop(ifp, true);
+
        evcnt_attach_dynamic(&sc->sc_ev_rx_stall, EVCNT_TYPE_MISC,
            NULL, xname, "rx stall");
        evcnt_attach_dynamic(&sc->sc_ev_tx_stall, EVCNT_TYPE_MISC,



Home | Main Index | Thread Index | Old Index