svn commit: r210269 - head/sys/dev/bce

Pyun YongHyeon yongari at FreeBSD.org
Mon Jul 19 23:35:43 UTC 2010


Author: yongari
Date: Mon Jul 19 23:35:43 2010
New Revision: 210269
URL: http://svn.freebsd.org/changeset/base/210269

Log:
  Use bus_get_dma_tag() to get parent tag. Also use
  BUS_SPACE_MAXSIZE_32BIT to specify sum of all segment lengths.
  Previously it used MAXBSIZE which was wrong.
  
  Reviewed by:	davidch

Modified:
  head/sys/dev/bce/if_bce.c

Modified: head/sys/dev/bce/if_bce.c
==============================================================================
--- head/sys/dev/bce/if_bce.c	Mon Jul 19 23:33:42 2010	(r210268)
+++ head/sys/dev/bce/if_bce.c	Mon Jul 19 23:35:43 2010	(r210269)
@@ -3146,10 +3146,10 @@ bce_dma_alloc(device_t dev)
 	/*
 	 * Allocate the parent bus DMA tag appropriate for PCI.
 	 */
-	if (bus_dma_tag_create(NULL, 1,	BCE_DMA_BOUNDARY,
+	if (bus_dma_tag_create(bus_get_dma_tag(dev), 1, BCE_DMA_BOUNDARY,
 	    sc->max_bus_addr, BUS_SPACE_MAXADDR, NULL, NULL,
-	    MAXBSIZE, BUS_SPACE_UNRESTRICTED, BUS_SPACE_MAXSIZE_32BIT,
-	    0, NULL, NULL, &sc->parent_tag)) {
+	    BUS_SPACE_MAXSIZE_32BIT, 0, BUS_SPACE_MAXSIZE_32BIT, 0, NULL, NULL,
+	    &sc->parent_tag)) {
 		BCE_PRINTF("%s(%d): Could not allocate parent DMA tag!\n",
 		    __FILE__, __LINE__);
 		rc = ENOMEM;


More information about the svn-src-head mailing list