Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/gemini gmc_ifstart(): Replace "IF_DEQUEUE() -> ...



details:   https://anonhg.NetBSD.org/src/rev/2427f48f7a95
branches:  trunk
changeset: 369513:2427f48f7a95
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Aug 20 18:35:50 2022 +0000

description:
gmc_ifstart(): Replace "IF_DEQUEUE() -> IF_PREPEND() on failure" with
"IF_POLL() -> IF_DEQUEUE() on success".

diffstat:

 sys/arch/arm/gemini/if_gmc.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r 1e797154a547 -r 2427f48f7a95 sys/arch/arm/gemini/if_gmc.c
--- a/sys/arch/arm/gemini/if_gmc.c      Sat Aug 20 16:47:01 2022 +0000
+++ b/sys/arch/arm/gemini/if_gmc.c      Sat Aug 20 18:35:50 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_gmc.c,v 1.13 2020/02/01 21:46:49 thorpej Exp $ */
+/* $NetBSD: if_gmc.c,v 1.14 2022/08/20 18:35:50 thorpej Exp $ */
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -47,7 +47,7 @@
 #include <net/if_ether.h>
 #include <net/if_dl.h>
 
-__KERNEL_RCSID(0, "$NetBSD: if_gmc.c,v 1.13 2020/02/01 21:46:49 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gmc.c,v 1.14 2022/08/20 18:35:50 thorpej Exp $");
 
 #define        MAX_TXSEG       32
 
@@ -393,14 +393,14 @@
 
        for (;;) {
                struct mbuf *m;
-               IF_DEQUEUE(&ifp->if_snd, m);
+               IF_POLL(&ifp->if_snd, m);
                if (m == NULL)
                        break;
                if (!gmc_txqueue(sc, sc->sc_txq[0], m)) {
-                       IF_PREPEND(&ifp->if_snd, m);
                        ifp->if_flags |= IFF_OACTIVE;
                        break;
                }
+               IF_DEQUEUE(&ifp->if_snd, m);
        }
 }
 



Home | Main Index | Thread Index | Old Index