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

Pyun YongHyeon yongari at FreeBSD.org
Tue Sep 7 18:29:29 UTC 2010


Author: yongari
Date: Tue Sep  7 18:29:29 2010
New Revision: 212302
URL: http://svn.freebsd.org/changeset/base/212302

Log:
  Make sure to create DMA'able memory for statistics block. This was
  missed in r212061 and it caused crashes for 570x controllers as
  controller DMAed statistics to physical address 0.
  
  Reported by:	kan

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

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Tue Sep  7 18:14:59 2010	(r212301)
+++ head/sys/dev/bge/if_bge.c	Tue Sep  7 18:29:29 2010	(r212302)
@@ -2258,6 +2258,15 @@ bge_dma_alloc(struct bge_softc *sc)
 	if (error)
 		return (error);
 
+	/* Create tag for statistics block. */
+	error = bge_dma_ring_alloc(sc, PAGE_SIZE, BGE_STATS_SZ,
+	    &sc->bge_cdata.bge_stats_tag,
+	    (uint8_t **)&sc->bge_ldata.bge_stats,
+	    &sc->bge_cdata.bge_stats_map,
+	    &sc->bge_ldata.bge_stats_paddr, "statistics block");
+	if (error)
+		return (error);
+
 	/* Create tag for jumbo RX ring. */
 	if (BGE_IS_JUMBO_CAPABLE(sc)) {
 		error = bge_dma_ring_alloc(sc, PAGE_SIZE, BGE_JUMBO_RX_RING_SZ,


More information about the svn-src-all mailing list