Module Name: src Committed By: thorpej Date: Sun Sep 18 15:28:01 UTC 2022
Modified Files: src/sys/arch/arm/sunxi: sunxi_can.c Log Message: Eliminate use of IFF_OACTIVE. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/sunxi/sunxi_can.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/arch/arm/sunxi/sunxi_can.c diff -u src/sys/arch/arm/sunxi/sunxi_can.c:1.8 src/sys/arch/arm/sunxi/sunxi_can.c:1.9 --- src/sys/arch/arm/sunxi/sunxi_can.c:1.8 Wed Jan 27 03:10:20 2021 +++ src/sys/arch/arm/sunxi/sunxi_can.c Sun Sep 18 15:28:01 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_can.c,v 1.8 2021/01/27 03:10:20 thorpej Exp $ */ +/* $NetBSD: sunxi_can.c,v 1.9 2022/09/18 15:28:01 thorpej Exp $ */ /*- * Copyright (c) 2017,2018 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(1, "$NetBSD: sunxi_can.c,v 1.8 2021/01/27 03:10:20 thorpej Exp $"); +__KERNEL_RCSID(1, "$NetBSD: sunxi_can.c,v 1.9 2022/09/18 15:28:01 thorpej Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -313,7 +313,6 @@ sunxi_can_tx_intr(struct sunxi_can_softc sc->sc_m_transmit = NULL; ifp->if_timer = 0; } - ifp->if_flags &= ~IFF_OACTIVE; if_schedule_deferred_start(ifp); } @@ -327,8 +326,7 @@ sunxi_can_tx_abort(struct sunxi_can_soft sc->sc_ifp->if_timer = 0; /* * the transmit abort will trigger a TX interrupt - * which will restart the queue or cleae OACTIVE, - * as appropriate + * which will restart the queue as appropriate. */ sunxi_can_write(sc, SUNXI_CAN_CMD_REG, SUNXI_CAN_CMD_ABT_REQ); return 1; @@ -418,7 +416,7 @@ sunxi_can_ifstart(struct ifnet *ifp) int i; mutex_enter(&sc->sc_intr_lock); - if (ifp->if_flags & IFF_OACTIVE) + if (sc->sc_m_transmit != NULL) goto out; IF_DEQUEUE(&ifp->if_snd, m); @@ -467,7 +465,6 @@ sunxi_can_ifstart(struct ifnet *ifp) } else { sunxi_can_write(sc, SUNXI_CAN_CMD_REG, SUNXI_CAN_CMD_TANS_REQ); } - ifp->if_flags |= IFF_OACTIVE; ifp->if_timer = 5; can_bpf_mtap(ifp, m, 0); out: @@ -536,7 +533,7 @@ sunxi_can_ifup(struct sunxi_can_softc * static void sunxi_can_ifdown(struct sunxi_can_softc * const sc) { - sc->sc_ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); + sc->sc_ifp->if_flags &= ~IFF_RUNNING; sc->sc_ifp->if_timer = 0; sunxi_can_enter_reset(sc); sunxi_can_write(sc, SUNXI_CAN_INTE_REG, 0);