Module Name:    src
Committed By:   kiyohara
Date:           Sun Jun 24 08:39:39 UTC 2012

Modified Files:
        src/sys/arch/powerpc/ibm4xx/dev: if_emac.c

Log Message:
Flush current empty descriptor in emac_rxeob_intr().


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/powerpc/ibm4xx/dev/if_emac.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/powerpc/ibm4xx/dev/if_emac.c
diff -u src/sys/arch/powerpc/ibm4xx/dev/if_emac.c:1.39 src/sys/arch/powerpc/ibm4xx/dev/if_emac.c:1.40
--- src/sys/arch/powerpc/ibm4xx/dev/if_emac.c:1.39	Sat Jun 18 06:41:42 2011
+++ src/sys/arch/powerpc/ibm4xx/dev/if_emac.c	Sun Jun 24 08:39:39 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_emac.c,v 1.39 2011/06/18 06:41:42 matt Exp $	*/
+/*	$NetBSD: if_emac.c,v 1.40 2012/06/24 08:39:39 kiyohara Exp $	*/
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -52,7 +52,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_emac.c,v 1.39 2011/06/18 06:41:42 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_emac.c,v 1.40 2012/06/24 08:39:39 kiyohara Exp $");
 
 #include "opt_emac.h"
 
@@ -1584,11 +1584,15 @@ emac_rxeob_intr(void *arg)
 
 		rxstat = sc->sc_rxdescs[i].md_stat_ctrl;
 
-		if (rxstat & MAL_RX_EMPTY)
+		if (rxstat & MAL_RX_EMPTY) {
 			/*
 			 * We have processed all of the receive buffers.
 			 */
+			/* Flush current empty descriptor */
+			EMAC_CDRXSYNC(sc, i,
+			    BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
 			break;
+		}
 
 		/*
 		 * If an error occurred, update stats, clear the status

Reply via email to