Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jul 2010 23:35:43 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r210269 - head/sys/dev/bce
Message-ID:  <201007192335.o6JNZhkp017796@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007192335.o6JNZhkp017796>