svn commit: r210083 - head/sys/dev/bge

Pyun YongHyeon yongari at FreeBSD.org
Wed Jul 14 21:47:50 UTC 2010


Author: yongari
Date: Wed Jul 14 21:47:49 2010
New Revision: 210083
URL: http://svn.freebsd.org/changeset/base/210083

Log:
  Remove enabling Data FIFO protection with indirect memory access.
  r165114 added that code and that change ignored the same logic
  committed in r135772. In addition, data FIFO protection should be
  selectively enabled instead of applying to all PCIe devices.
  While I'm here add BCM5785 to devices that do not require this
  fix.

Modified:
  head/sys/dev/bge/if_bge.c

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Wed Jul 14 21:24:18 2010	(r210082)
+++ head/sys/dev/bge/if_bge.c	Wed Jul 14 21:47:49 2010	(r210083)
@@ -3246,11 +3246,6 @@ bge_reset(struct bge_softc *sc)
 		DELAY(10);
 	}
 
-	if (sc->bge_flags & BGE_FLAG_PCIE) {
-		reset = bge_readmem_ind(sc, 0x7C00);
-		bge_writemem_ind(sc, 0x7C00, reset | (1 << 25));
-	}
-
 	/* Fix up byte swapping. */
 	CSR_WRITE_4(sc, BGE_MODE_CTL, BGE_DMA_SWAP_OPTIONS |
 	    BGE_MODECTL_BYTESWAP_DATA);
@@ -3275,7 +3270,9 @@ bge_reset(struct bge_softc *sc)
 
 	/* XXX: Broadcom Linux driver. */
 	if (sc->bge_flags & BGE_FLAG_PCIE &&
-	    sc->bge_chipid != BGE_CHIPID_BCM5750_A0) {
+	    sc->bge_chipid != BGE_CHIPID_BCM5750_A0 &&
+	    sc->bge_asicrev != BGE_ASICREV_BCM5785) {
+		/* Enable Data FIFO protection. */
 		val = CSR_READ_4(sc, 0x7C00);
 		CSR_WRITE_4(sc, 0x7C00, val | (1 << 25));
 	}


More information about the svn-src-all mailing list