From 83b7a52a1639cf331a280b0e55216edc2b3cd45d Mon Sep 17 00:00:00 2001 From: delphij Date: Mon, 6 Oct 2008 22:34:17 +0000 Subject: Limit DMA memory to lower addressable 4GB, without this patch, we can reliably provoke data corruption on systems equipped with a plenty of memory during high load. Reported by: gnn via iXsystems MFC candidate: RELENG_7_1, RELENG_7 --- sys/dev/twa/tw_osl_freebsd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/twa/tw_osl_freebsd.c b/sys/dev/twa/tw_osl_freebsd.c index b1fd287..d18fd0a 100644 --- a/sys/dev/twa/tw_osl_freebsd.c +++ b/sys/dev/twa/tw_osl_freebsd.c @@ -492,7 +492,7 @@ tw_osli_alloc_mem(struct twa_softc *sc) if (bus_dma_tag_create(NULL, /* parent */ sc->alignment, /* alignment */ 0, /* boundary */ - BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ TW_CL_MAX_IO_SIZE, /* maxsize */ @@ -515,7 +515,7 @@ tw_osli_alloc_mem(struct twa_softc *sc) if (bus_dma_tag_create(sc->parent_tag, /* parent */ sc->alignment, /* alignment */ 0, /* boundary */ - BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ dma_mem_size, /* maxsize */ @@ -562,7 +562,7 @@ tw_osli_alloc_mem(struct twa_softc *sc) if (bus_dma_tag_create(sc->parent_tag, /* parent */ sc->alignment, /* alignment */ 0, /* boundary */ - BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ TW_CL_MAX_IO_SIZE, /* maxsize */ @@ -588,7 +588,7 @@ tw_osli_alloc_mem(struct twa_softc *sc) if (bus_dma_tag_create(sc->parent_tag, /* parent */ sc->alignment, /* alignment */ 0, /* boundary */ - BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ TW_CL_MAX_IO_SIZE, /* maxsize */ -- cgit v1.1