Module Name:    src
Committed By:   msaitoh
Date:           Sun Mar 17 18:46:11 UTC 2013

Modified Files:
        src/sys/dev/pci: if_bge.c if_bgereg.h

Log Message:
No functional change:
 - Fix comment
 - Use macro
 - Remove unused macro


To generate a diff of this commit:
cvs rdiff -u -r1.216 -r1.217 src/sys/dev/pci/if_bge.c
cvs rdiff -u -r1.63 -r1.64 src/sys/dev/pci/if_bgereg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_bge.c
diff -u src/sys/dev/pci/if_bge.c:1.216 src/sys/dev/pci/if_bge.c:1.217
--- src/sys/dev/pci/if_bge.c:1.216	Sun Mar 17 04:06:39 2013
+++ src/sys/dev/pci/if_bge.c	Sun Mar 17 18:46:10 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bge.c,v 1.216 2013/03/17 04:06:39 msaitoh Exp $	*/
+/*	$NetBSD: if_bge.c,v 1.217 2013/03/17 18:46:10 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.216 2013/03/17 04:06:39 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.217 2013/03/17 18:46:10 msaitoh Exp $");
 
 #include "vlan.h"
 
@@ -2940,7 +2940,7 @@ bge_blockinit(struct bge_softc *sc)
 	    BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5784 ||
 	    BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5785 ||
 	    BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM57780 ||
-	    BGE_IS_5717_PLUS(sc)) { /* XXX msaitoh 57765? */
+	    BGE_IS_5717_PLUS(sc)) { /* XXX 57765? */
 		dmactl = CSR_READ_4(sc, BGE_RDMA_RSRVCTRL);
 		/*
 		 * Adjust tx margin to prevent TX data corruption and
@@ -4004,8 +4004,9 @@ bge_reset(struct bge_softc *sc)
 		uint32_t v;
 
 		/* Enable PCI Express bug fix */
-		v = CSR_READ_4(sc, 0x7c00);
-		CSR_WRITE_4(sc, 0x7c00, v | (1<<25));
+		v = CSR_READ_4(sc, BGE_TLP_CONTROL_REG);
+		CSR_WRITE_4(sc, BGE_TLP_CONTROL_REG,
+		    v | BGE_TLP_DATA_FIFO_PROTECT);
 	}
 
 	if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5720)

Index: src/sys/dev/pci/if_bgereg.h
diff -u src/sys/dev/pci/if_bgereg.h:1.63 src/sys/dev/pci/if_bgereg.h:1.64
--- src/sys/dev/pci/if_bgereg.h:1.63	Sun Mar 17 04:06:39 2013
+++ src/sys/dev/pci/if_bgereg.h	Sun Mar 17 18:46:10 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bgereg.h,v 1.63 2013/03/17 04:06:39 msaitoh Exp $	*/
+/*	$NetBSD: if_bgereg.h,v 1.64 2013/03/17 18:46:10 msaitoh Exp $	*/
 /*
  * Copyright (c) 2001 Wind River Systems
  * Copyright (c) 1997, 1998, 1999, 2001
@@ -1867,12 +1867,6 @@
 #define	BGE_RX_CPU_DRV_EVENT		0x00004000
 
 /*
- * XXX: Those names are made up as I have no documentation about it;
- *      I only know it is only used in the PCI-Express case.
- */
-#define BGE_PCIE_CTL0			0x7c00
-
-/*
  * NVRAM Control registers
  */
 #define	BGE_NVRAM_CMD			0x7000

Reply via email to