Module Name:    src
Committed By:   martin
Date:           Sun Nov 23 11:08:16 UTC 2014

Modified Files:
        src/sys/dev/ic: dwc_gmac.c

Log Message:
Revert previous change to dwc_gmac_txintr() - while it looks strange at
first sight (and sorry I didn't spot it when reviewing), it is a small
optimization and actually correct.
Add a comment explaining it.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/ic/dwc_gmac.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/ic/dwc_gmac.c
diff -u src/sys/dev/ic/dwc_gmac.c:1.25 src/sys/dev/ic/dwc_gmac.c:1.26
--- src/sys/dev/ic/dwc_gmac.c:1.25	Sat Nov 22 18:31:03 2014
+++ src/sys/dev/ic/dwc_gmac.c	Sun Nov 23 11:08:16 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_gmac.c,v 1.25 2014/11/22 18:31:03 jmcneill Exp $ */
+/* $NetBSD: dwc_gmac.c,v 1.26 2014/11/23 11:08:16 martin Exp $ */
 
 /*-
  * Copyright (c) 2013, 2014 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.25 2014/11/22 18:31:03 jmcneill Exp $");
+__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.26 2014/11/23 11:08:16 martin Exp $");
 
 /* #define	DWC_GMAC_DEBUG	1 */
 
@@ -982,7 +982,12 @@ dwc_gmac_tx_intr(struct dwc_gmac_softc *
 #endif
 
 		desc = &sc->sc_txq.t_desc[i];
-		dwc_gmac_txdesc_sync(sc, i, TX_NEXT(i),
+		/*
+		 * i+1 does not need to be a valid descriptor,
+		 * this is just a special notion to just sync
+		 * a single tx descriptor (i)
+		 */
+		dwc_gmac_txdesc_sync(sc, i, i+1,
 		    BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
 		flags = le32toh(desc->ddesc_status);
 

Reply via email to