Module Name: src Committed By: ozaki-r Date: Tue Mar 7 01:28:37 UTC 2017
Modified Files: src/sys/dev/ic: cs89x0.c Log Message: Apply deferred if_start (from maya@) Fix PR kern/52023 To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/dev/ic/cs89x0.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/cs89x0.c diff -u src/sys/dev/ic/cs89x0.c:1.38 src/sys/dev/ic/cs89x0.c:1.39 --- src/sys/dev/ic/cs89x0.c:1.38 Thu Dec 15 09:28:05 2016 +++ src/sys/dev/ic/cs89x0.c Tue Mar 7 01:28:37 2017 @@ -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 @@ cs_attach(struct cs_softc *sc, u_int8_t /* 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 @@ cs_transmit_event(struct cs_softc *sc, u /* 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