Module Name:    src
Committed By:   thorpej
Date:           Sat Aug 20 19:01:32 UTC 2022

Modified Files:
        src/sys/dev/ieee1394: if_fwip.c

Log Message:
fwip_async_output(): 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.30 -r1.31 src/sys/dev/ieee1394/if_fwip.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/dev/ieee1394/if_fwip.c
diff -u src/sys/dev/ieee1394/if_fwip.c:1.30 src/sys/dev/ieee1394/if_fwip.c:1.31
--- src/sys/dev/ieee1394/if_fwip.c:1.30	Wed Jan 29 06:19:39 2020
+++ src/sys/dev/ieee1394/if_fwip.c	Sat Aug 20 19:01:31 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_fwip.c,v 1.30 2020/01/29 06:19:39 thorpej Exp $	*/
+/*	$NetBSD: if_fwip.c,v 1.31 2022/08/20 19:01:31 thorpej Exp $	*/
 /*-
  * Copyright (c) 2004
  *	Doug Rabson
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_fwip.c,v 1.30 2020/01/29 06:19:39 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_fwip.c,v 1.31 2022/08/20 19:01:31 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -552,7 +552,7 @@ fwip_async_output(struct fwip_softc *sc,
 #endif
 			break;
 		}
-		IF_DEQUEUE(&ifp->if_snd, m);
+		IF_POLL(&ifp->if_snd, m);
 		if (m == NULL) {
 			mutex_exit(&sc->sc_mtx);
 			break;
@@ -663,9 +663,9 @@ fwip_async_output(struct fwip_softc *sc,
 			mutex_enter(&sc->sc_mtx);
 			STAILQ_INSERT_TAIL(&sc->sc_xferlist, xfer, link);
 			mutex_exit(&sc->sc_mtx);
-			IF_PREPEND(&ifp->if_snd, m);
 			break;
 		}
+		IF_DEQUEUE(&ifp->if_snd, m);
 		if (error) {
 			/* error */
 			if_statinc(ifp, if_oerrors);

Reply via email to