Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Eliminate use of IFF_OACTIVE.
details: https://anonhg.NetBSD.org/src/rev/7bda5ae929ba
branches: trunk
changeset: 370103:7bda5ae929ba
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sat Sep 17 15:44:15 2022 +0000
description:
Eliminate use of IFF_OACTIVE.
diffstat:
sys/dev/pci/if_vge.c | 25 +++++--------------------
1 files changed, 5 insertions(+), 20 deletions(-)
diffs (86 lines):
diff -r aa5644b352f2 -r 7bda5ae929ba sys/dev/pci/if_vge.c
--- a/sys/dev/pci/if_vge.c Sat Sep 17 15:33:52 2022 +0000
+++ b/sys/dev/pci/if_vge.c Sat Sep 17 15:44:15 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_vge.c,v 1.84 2022/05/23 13:53:37 rin Exp $ */
+/* $NetBSD: if_vge.c,v 1.85 2022/09/17 15:44:15 thorpej Exp $ */
/*-
* Copyright (c) 2004
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vge.c,v 1.84 2022/05/23 13:53:37 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vge.c,v 1.85 2022/09/17 15:44:15 thorpej Exp $");
/*
* VIA Networking Technologies VT612x PCI gigabit ethernet NIC driver.
@@ -1399,10 +1399,6 @@
sc->sc_tx_considx = idx;
- if (sc->sc_tx_free > 0) {
- ifp->if_flags &= ~IFF_OACTIVE;
- }
-
/*
* If not all descriptors have been released reaped yet,
* reload the timer so that we will eventually get another
@@ -1647,7 +1643,7 @@
sc = ifp->if_softc;
if (!sc->sc_link ||
- (ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING) {
+ (ifp->if_flags & IFF_RUNNING) == 0) {
return;
}
@@ -1661,20 +1657,12 @@
* until we drain the queue, or use up all available transmit
* descriptors.
*/
- for (;;) {
+ while (sc->sc_tx_free != 0) {
/* Grab a packet off the queue. */
IFQ_POLL(&ifp->if_snd, m_head);
if (m_head == NULL)
break;
- if (sc->sc_tx_free == 0) {
- /*
- * All slots used, stop for now.
- */
- ifp->if_flags |= IFF_OACTIVE;
- break;
- }
-
txs = &sc->sc_txsoft[idx];
KASSERT(txs->txs_mbuf == NULL);
@@ -1691,8 +1679,6 @@
/*
* Short on resources, just stop for now.
*/
- if (error == ENOBUFS)
- ifp->if_flags |= IFF_OACTIVE;
break;
}
@@ -1926,7 +1912,6 @@
goto out;
ifp->if_flags |= IFF_RUNNING;
- ifp->if_flags &= ~IFF_OACTIVE;
sc->sc_if_flags = 0;
sc->sc_link = 0;
@@ -2071,7 +2056,7 @@
s = splnet();
ifp->if_timer = 0;
- ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
+ ifp->if_flags &= ~IFF_RUNNING;
#ifdef DEVICE_POLLING
ether_poll_deregister(ifp);
#endif /* DEVICE_POLLING */
Home |
Main Index |
Thread Index |
Old Index