Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Eliminate use of IFF_OACTIVE.
details: https://anonhg.NetBSD.org/src/rev/e27195b6bae8
branches: trunk
changeset: 370148:e27195b6bae8
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sun Sep 18 17:18:19 2022 +0000
description:
Eliminate use of IFF_OACTIVE.
diffstat:
sys/dev/ic/bcmgenet.c | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
diffs (67 lines):
diff -r 106efc40b165 -r e27195b6bae8 sys/dev/ic/bcmgenet.c
--- a/sys/dev/ic/bcmgenet.c Sun Sep 18 17:11:33 2022 +0000
+++ b/sys/dev/ic/bcmgenet.c Sun Sep 18 17:18:19 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcmgenet.c,v 1.13 2022/08/01 07:37:18 mlelstv Exp $ */
+/* $NetBSD: bcmgenet.c,v 1.14 2022/09/18 17:18:19 thorpej Exp $ */
/*-
* Copyright (c) 2020 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -34,7 +34,7 @@
#include "opt_ddb.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcmgenet.c,v 1.13 2022/08/01 07:37:18 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcmgenet.c,v 1.14 2022/09/18 17:18:19 thorpej Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -600,7 +600,6 @@
genet_enable_intr(sc);
ifp->if_flags |= IFF_RUNNING;
- ifp->if_flags &= ~IFF_OACTIVE;
mii_mediachg(mii);
callout_schedule(&sc->sc_stat_ch, hz);
@@ -663,7 +662,7 @@
/* Disable interrupts */
genet_disable_intr(sc);
- ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
+ ifp->if_flags &= ~IFF_RUNNING;
}
static void
@@ -791,7 +790,6 @@
++pkts;
}
- ifp->if_flags &= ~IFF_OACTIVE;
i = TX_NEXT(i);
sc->sc_tx.cidx = (sc->sc_tx.cidx + 1) & 0xffff;
}
@@ -811,7 +809,7 @@
GENET_ASSERT_TXLOCKED(sc);
- if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
+ if ((ifp->if_flags & IFF_RUNNING) == 0)
return;
const int qid = GENET_DMA_DEFAULT_QUEUE;
@@ -829,12 +827,10 @@
nsegs = genet_setup_txbuf(sc, index, m);
if (nsegs <= 0) {
- if (nsegs == -1) {
- ifp->if_flags |= IFF_OACTIVE;
- }
- else if (nsegs == -2) {
+ if (nsegs == -2) {
IFQ_DEQUEUE(&ifp->if_snd, m);
m_freem(m);
+ continue;
}
break;
}
Home |
Main Index |
Thread Index |
Old Index