From 81b5da5e880ffc9c441eee95cfc09b17bce754a4 Mon Sep 17 00:00:00 2001 From: jhb Date: Wed, 7 Mar 2012 18:53:56 +0000 Subject: [PATCH] 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. --- sys/dev/twa/tw_osl.h | 6 ------ sys/dev/twa/tw_osl_freebsd.c | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/sys/dev/twa/tw_osl.h b/sys/dev/twa/tw_osl.h index 8927c76aa5f..50fa722954e 100644 --- a/sys/dev/twa/tw_osl.h +++ b/sys/dev/twa/tw_osl.h @@ -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 */ diff --git a/sys/dev/twa/tw_osl_freebsd.c b/sys/dev/twa/tw_osl_freebsd.c index 0d018b68f8a..aedcfe8f8cd 100644 --- a/sys/dev/twa/tw_osl_freebsd.c +++ b/sys/dev/twa/tw_osl_freebsd.c @@ -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 */ -- 2.45.0