Module Name: src Committed By: thorpej Date: Sun Sep 18 10:54:53 UTC 2022
Modified Files: src/sys/arch/macppc/dev: am79c950.c if_mcvar.h Log Message: Eliminate use of IFF_OACTIVE. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/arch/macppc/dev/am79c950.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/macppc/dev/if_mcvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/macppc/dev/am79c950.c diff -u src/sys/arch/macppc/dev/am79c950.c:1.50 src/sys/arch/macppc/dev/am79c950.c:1.51 --- src/sys/arch/macppc/dev/am79c950.c:1.50 Tue Oct 20 18:17:58 2020 +++ src/sys/arch/macppc/dev/am79c950.c Sun Sep 18 10:54:52 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: am79c950.c,v 1.50 2020/10/20 18:17:58 roy Exp $ */ +/* $NetBSD: am79c950.c,v 1.51 2022/09/18 10:54:52 thorpej Exp $ */ /*- * Copyright (c) 1997 David Huang <k...@bga.com> @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: am79c950.c,v 1.50 2020/10/20 18:17:58 roy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: am79c950.c,v 1.51 2022/09/18 10:54:52 thorpej Exp $"); #include "opt_inet.h" @@ -250,13 +250,10 @@ mcstart(struct ifnet *ifp) struct mc_softc *sc = ifp->if_softc; struct mbuf *m; - if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING) + if ((ifp->if_flags & IFF_RUNNING) == 0) return; - while (1) { - if (ifp->if_flags & IFF_OACTIVE) - return; - + while (!sc->sc_txbusy) { IF_DEQUEUE(&ifp->if_snd, m); if (m == 0) return; @@ -268,7 +265,7 @@ mcstart(struct ifnet *ifp) bpf_mtap(ifp, m, BPF_D_OUT); /* Copy the mbuf chain into the transmit buffer. */ - ifp->if_flags |= IFF_OACTIVE; + sc->sc_txbusy = true; maceput(sc, m); if_statinc(ifp, if_opackets); /* # of pkts */ @@ -348,7 +345,7 @@ mcinit(struct mc_softc *sc) /* Flag interface as "running" */ sc->sc_if.if_flags |= IFF_RUNNING; - sc->sc_if.if_flags &= ~IFF_OACTIVE; + sc->sc_txbusy = false; splx(s); return 0; @@ -515,7 +512,7 @@ mc_tint(struct mc_softc *sc) } IF_STAT_PUTREF(&sc->sc_if); - sc->sc_if.if_flags &= ~IFF_OACTIVE; + sc->sc_txbusy = false; sc->sc_if.if_timer = 0; if_schedule_deferred_start(&sc->sc_if); } Index: src/sys/arch/macppc/dev/if_mcvar.h diff -u src/sys/arch/macppc/dev/if_mcvar.h:1.13 src/sys/arch/macppc/dev/if_mcvar.h:1.14 --- src/sys/arch/macppc/dev/if_mcvar.h:1.13 Tue Jul 26 08:36:02 2011 +++ src/sys/arch/macppc/dev/if_mcvar.h Sun Sep 18 10:54:52 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: if_mcvar.h,v 1.13 2011/07/26 08:36:02 macallan Exp $ */ +/* $NetBSD: if_mcvar.h,v 1.14 2022/09/18 10:54:52 thorpej Exp $ */ /*- * Copyright (c) 1997 David Huang <k...@bga.com> @@ -86,6 +86,7 @@ struct mc_softc { u_char *sc_txbuf, *sc_rxbuf; int sc_txbuf_phys, sc_rxbuf_phys; int sc_tail; + bool sc_txbusy; int sc_node; dbdma_regmap_t *sc_txdma;