Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Apply deferred if_start (from maya@)



details:   https://anonhg.NetBSD.org/src/rev/5b3ad43e684f
branches:  trunk
changeset: 822204:5b3ad43e684f
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Tue Mar 07 01:28:37 2017 +0000

description:
Apply deferred if_start (from maya@)

Fix PR kern/52023

diffstat:

 sys/dev/ic/cs89x0.c |  12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diffs (40 lines):

diff -r 7b73fa2f2064 -r 5b3ad43e684f sys/dev/ic/cs89x0.c
--- a/sys/dev/ic/cs89x0.c       Mon Mar 06 23:07:42 2017 +0000
+++ b/sys/dev/ic/cs89x0.c       Tue Mar 07 01:28:37 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cs89x0.c,v 1.38 2016/12/15 09:28:05 ozaki-r Exp $      */
+/*     $NetBSD: cs89x0.c,v 1.39 2017/03/07 01:28:37 ozaki-r Exp $      */
 
 /*
  * Copyright (c) 2004 Christopher Gilbert
@@ -212,7 +212,7 @@
 */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cs89x0.c,v 1.38 2016/12/15 09:28:05 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cs89x0.c,v 1.39 2017/03/07 01:28:37 ozaki-r Exp $");
 
 #include "opt_inet.h"
 
@@ -486,6 +486,7 @@
 
        /* Attach the interface. */
        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),
@@ -1583,11 +1584,8 @@
        /* Transmission is no longer in progress */
        sc->sc_txbusy = FALSE;
 
-       /* If there is more to transmit */
-       if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) {
-               /* Start the next transmission */
-               cs_start_output(ifp);
-       }
+       /* If there is more to transmit, start the next transmission */
+       if_schedule_deferred_start(ifp);
 }
 
 void



Home | Main Index | Thread Index | Old Index