Module Name:    src
Committed By:   thorpej
Date:           Sat Aug 20 18:36:17 UTC 2022

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

Log Message:
gpn_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.14 -r1.15 src/sys/arch/arm/gemini/if_gpn.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_gpn.c
diff -u src/sys/arch/arm/gemini/if_gpn.c:1.14 src/sys/arch/arm/gemini/if_gpn.c:1.15
--- src/sys/arch/arm/gemini/if_gpn.c:1.14	Sat Feb  1 21:45:11 2020
+++ src/sys/arch/arm/gemini/if_gpn.c	Sat Aug 20 18:36:16 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: if_gpn.c,v 1.14 2020/02/01 21:45:11 thorpej Exp $ */
+/* $NetBSD: if_gpn.c,v 1.15 2022/08/20 18:36:16 thorpej Exp $ */
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -32,7 +32,7 @@
 
 #include "opt_gemini.h"
 
-__KERNEL_RCSID(0, "$NetBSD: if_gpn.c,v 1.14 2020/02/01 21:45:11 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gpn.c,v 1.15 2022/08/20 18:36:16 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -363,7 +363,7 @@ gpn_ifstart(struct ifnet *ifp)
 			break;
 		}
 
-		IF_DEQUEUE(&ifp->if_snd, m);
+		IF_POLL(&ifp->if_snd, m);
 		if (!m)
 			break;
 
@@ -396,10 +396,10 @@ gpn_ifstart(struct ifnet *ifp)
 		 */
 		if (sc->sc_free < count
 		    || sc->sc_txactive + count > MAX_TXACTIVE) {
-			IF_PREPEND(&ifp->if_snd, m);
 			ifp->if_flags |= IFF_OACTIVE;
 			return;
 		}
+		IF_DEQUEUE(&ifp->if_snd, m);
 
 		bpf_mtap(ifp, m, BPF_D_OUT);
 #ifdef GPNDEBUG

Reply via email to