Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Revert previous change to dwc_gmac_txintr() - whi...



details:   https://anonhg.NetBSD.org/src/rev/75ad39124e0a
branches:  trunk
changeset: 804091:75ad39124e0a
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Nov 23 11:08:16 2014 +0000

description:
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.

diffstat:

 sys/dev/ic/dwc_gmac.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r fb2c98f883c1 -r 75ad39124e0a sys/dev/ic/dwc_gmac.c
--- a/sys/dev/ic/dwc_gmac.c     Sun Nov 23 10:00:20 2014 +0000
+++ b/sys/dev/ic/dwc_gmac.c     Sun Nov 23 11:08:16 2014 +0000
@@ -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 @@
 #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);
 



Home | Main Index | Thread Index | Old Index