Module Name:    src
Committed By:   thorpej
Date:           Sat Aug 20 18:35:50 UTC 2022

Modified Files:
        src/sys/arch/arm/gemini: if_gmc.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/gemini/if_gmc.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/gemini/if_gmc.c
diff -u src/sys/arch/arm/gemini/if_gmc.c:1.13 src/sys/arch/arm/gemini/if_gmc.c:1.14
--- src/sys/arch/arm/gemini/if_gmc.c:1.13	Sat Feb  1 21:46:49 2020
+++ src/sys/arch/arm/gemini/if_gmc.c	Sat Aug 20 18:35:50 2022
@@ -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 @@ gmc_ifstart(struct ifnet *ifp)
 
 	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);
 	}
 }
 

Reply via email to