Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci For BGE_IS_575X_PLUS() devices, don't set BGE_RX...



details:   https://anonhg.NetBSD.org/src/rev/56d3349d4582
branches:  trunk
changeset: 786817:56d3349d4582
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon May 13 17:10:58 2013 +0000

description:
For BGE_IS_575X_PLUS() devices, don't set BGE_RXLPSTATCONTROL_DACK_FIX bits because
these bits are reserved.

diffstat:

 sys/dev/pci/if_bge.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r abbc5a0f9117 -r 56d3349d4582 sys/dev/pci/if_bge.c
--- a/sys/dev/pci/if_bge.c      Mon May 13 17:08:20 2013 +0000
+++ b/sys/dev/pci/if_bge.c      Mon May 13 17:10:58 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bge.c,v 1.243 2013/05/13 17:08:20 msaitoh Exp $     */
+/*     $NetBSD: if_bge.c,v 1.244 2013/05/13 17:10:58 msaitoh Exp $     */
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.243 2013/05/13 17:08:20 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.244 2013/05/13 17:10:58 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -2860,7 +2860,13 @@
 
        /* 5718 step 29, 57XX step 58 */
        /* Inialize RX list placement stats mask. */
-       CSR_WRITE_4(sc, BGE_RXLP_STATS_ENABLE_MASK, 0x007FFFFF);
+       if (BGE_IS_575X_PLUS(sc)) {
+               val = CSR_READ_4(sc, BGE_RXLP_STATS_ENABLE_MASK);
+               val &= ~BGE_RXLPSTATCONTROL_DACK_FIX;
+               CSR_WRITE_4(sc, BGE_RXLP_STATS_ENABLE_MASK, val);
+       } else
+               CSR_WRITE_4(sc, BGE_RXLP_STATS_ENABLE_MASK, 0x007FFFFF);
+
        /* 5718 step 30, 57XX step 59 */
        CSR_WRITE_4(sc, BGE_RXLP_STATS_CTL, 0x1);
 



Home | Main Index | Thread Index | Old Index