Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Mar 2012 18:53:57 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r232669 - head/sys/dev/twa
Message-ID:  <201203071853.q27IrvHJ006199@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Wed Mar  7 18:53:56 2012
New Revision: 232669
URL: http://svn.freebsd.org/changeset/base/232669

Log:
  Use bus_get_dma_tag() to inherit the 4G boundary restriction from the
  parent PCI bus and remove the home-grown version in this driver.

Modified:
  head/sys/dev/twa/tw_osl.h
  head/sys/dev/twa/tw_osl_freebsd.c

Modified: head/sys/dev/twa/tw_osl.h
==============================================================================
--- head/sys/dev/twa/tw_osl.h	Wed Mar  7 18:52:46 2012	(r232668)
+++ head/sys/dev/twa/tw_osl.h	Wed Mar  7 18:53:56 2012	(r232669)
@@ -55,12 +55,6 @@
 #define TW_OSLI_MAX_NUM_IOS		(TW_OSLI_MAX_NUM_REQUESTS - 2)
 #define TW_OSLI_MAX_NUM_AENS		0x100
 
-#ifdef PAE
-#define	TW_OSLI_DMA_BOUNDARY		(1u << 31)
-#else
-#define	TW_OSLI_DMA_BOUNDARY		((bus_size_t)((uint64_t)1 << 32))
-#endif
-
 /* Possible values of req->state. */
 #define TW_OSLI_REQ_STATE_INIT		0x0	/* being initialized */
 #define TW_OSLI_REQ_STATE_BUSY		0x1	/* submitted to CL */

Modified: head/sys/dev/twa/tw_osl_freebsd.c
==============================================================================
--- head/sys/dev/twa/tw_osl_freebsd.c	Wed Mar  7 18:52:46 2012	(r232668)
+++ head/sys/dev/twa/tw_osl_freebsd.c	Wed Mar  7 18:53:56 2012	(r232669)
@@ -562,9 +562,9 @@ tw_osli_alloc_mem(struct twa_softc *sc)
 	}
 
 	/* Create the parent dma tag. */
-	if (bus_dma_tag_create(NULL,			/* parent */
+	if (bus_dma_tag_create(bus_get_dma_tag(sc->bus_dev), /* parent */
 				sc->alignment,		/* alignment */
-				TW_OSLI_DMA_BOUNDARY,	/* boundary */
+				0,			/* boundary */
 				BUS_SPACE_MAXADDR,	/* lowaddr */
 				BUS_SPACE_MAXADDR, 	/* highaddr */
 				NULL, NULL, 		/* filter, filterarg */



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