Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/booke/dev Make sure initialize the ATTR reg...



details:   https://anonhg.NetBSD.org/src/rev/ff3a8ee49520
branches:  trunk
changeset: 765977:ff3a8ee49520
user:      matt <matt%NetBSD.org@localhost>
date:      Sun Jun 12 05:37:54 2011 +0000

description:
Make sure initialize the ATTR registers.

diffstat:

 sys/arch/powerpc/booke/dev/pq3etsec.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (27 lines):

diff -r 41c6ecc6fa28 -r ff3a8ee49520 sys/arch/powerpc/booke/dev/pq3etsec.c
--- a/sys/arch/powerpc/booke/dev/pq3etsec.c     Sun Jun 12 05:32:38 2011 +0000
+++ b/sys/arch/powerpc/booke/dev/pq3etsec.c     Sun Jun 12 05:37:54 2011 +0000
@@ -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);



Home | Main Index | Thread Index | Old Index