Module Name:    src
Committed By:   matt
Date:           Sun Jun 12 05:37:55 UTC 2011

Modified Files:
        src/sys/arch/powerpc/booke/dev: pq3etsec.c

Log Message:
Make sure initialize the ATTR registers.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/booke/dev/pq3etsec.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/booke/dev/pq3etsec.c
diff -u src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.3 src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.4
--- src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.3	Wed Mar 16 05:31:03 2011
+++ src/sys/arch/powerpc/booke/dev/pq3etsec.c	Sun Jun 12 05:37:54 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pq3etsec.c,v 1.3 2011/03/16 05:31:03 matt Exp $	*/
+/*	$NetBSD: pq3etsec.c,v 1.4 2011/06/12 05:37:54 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -588,6 +588,9 @@
 
 	aprint_normal("\n");
 
+	etsec_write(sc, ATTR, ATTR_DEFAULT);
+	etsec_write(sc, ATTRELI, ATTRELI_DEFAULT);
+
 	sc->sc_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_SOFTNET);
 
 	callout_init(&sc->sc_mii_callout, CALLOUT_MPSAFE);
@@ -1458,6 +1461,7 @@
 		if (consumer == rxq->rxq_producer) {
 			rxq->rxq_consumer = consumer;
 			rxq->rxq_inuse -= rxconsumed;
+			KASSERT(rxq->rxq_inuse == 0);
 			return;
 		}
 		pq3etsec_rxq_desc_postsync(sc, rxq, consumer, 1);

Reply via email to