8.0-BETA3 and txp(4) panic: vm_phys_alloc_contig

Pyun YongHyeon pyunyh at gmail.com
Mon Aug 31 19:30:52 UTC 2009


On Mon, Aug 31, 2009 at 02:29:10PM -0400, Jeff Blank wrote:
> On Mon, Aug 31, 2009 at 10:49:18AM -0700, Pyun YongHyeon wrote:
> > Hmm, this is odd. I can't find where the alignment is not power of
> > 2 in txp_dma_alloc(). Could you show me the line number of
> > txp_attach+0x6f5?
> 
> What's the command to do this?  I thought it might be
> 'x/A txp_attach+0x65f', but that gave me nothing.  (I don't
> have a crash dump to work with, just a serial console and ddb.)
> 

Hmm... never mind. Please try attached patch let me know how it
goes.

> Jeff
-------------- next part --------------
Index: sys/dev/txp/if_txp.c
===================================================================
--- sys/dev/txp/if_txp.c	(revision 196606)
+++ sys/dev/txp/if_txp.c	(working copy)
@@ -1389,7 +1389,8 @@
 
 	/* High priority rx ring. */
 	error = txp_dma_alloc(sc, "hi priority rx ring",
-	    &sc->sc_cdata.txp_rxhiring_tag, sizeof(struct txp_rx_desc), 0,
+	    &sc->sc_cdata.txp_rxhiring_tag,
+	    roundup(sizeof(struct txp_rx_desc), 16), 0,
 	    &sc->sc_cdata.txp_rxhiring_map, (void **)&sc->sc_ldata.txp_rxhiring,
 	    sizeof(struct txp_rx_desc) * RX_ENTRIES,
 	    &sc->sc_ldata.txp_rxhiring_paddr);
@@ -1409,7 +1410,8 @@
 
 	/* Low priority rx ring. */
 	error = txp_dma_alloc(sc, "low priority rx ring",
-	    &sc->sc_cdata.txp_rxloring_tag, sizeof(struct txp_rx_desc), 0,
+	    &sc->sc_cdata.txp_rxloring_tag,
+	    roundup(sizeof(struct txp_rx_desc), 16), 0,
 	    &sc->sc_cdata.txp_rxloring_map, (void **)&sc->sc_ldata.txp_rxloring,
 	    sizeof(struct txp_rx_desc) * RX_ENTRIES,
 	    &sc->sc_ldata.txp_rxloring_paddr);


More information about the freebsd-stable mailing list