diff options
author | yongari <yongari@FreeBSD.org> | 2011-01-04 19:10:54 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2011-01-04 19:10:54 +0000 |
commit | 72ce649bd8dd5ae42b995d85e70c0c7d7712d0e5 (patch) | |
tree | 0940eb38e500c5c3da40afd6eea8b1ea9952be14 /sys/dev | |
parent | 7d0e430fef6009c4dba11f80637a4ead4a129cb9 (diff) | |
download | FreeBSD-src-72ce649bd8dd5ae42b995d85e70c0c7d7712d0e5.zip FreeBSD-src-72ce649bd8dd5ae42b995d85e70c0c7d7712d0e5.tar.gz |
Partially revert change made in r212061. r212061 relied on
bus_dma(9)'s capability which honors boundary restrictions of DMA
tag for dynamic buffers. However it seems this does not work well
and it triggered watchodg timeouts on controller that has the
hardware bug. It's not clear whether there is still another
hardware bug not mentioned in errata. This should be revisited
since this change shall make use of bounce buffers which in turn
reduces performance a lot on systems that have more than 4GB
memory.
Reported by: Michael L. Squires (mikes <> siralan dot org)
Tested by: Michael L. Squires (mikes <> siralan dot org)
MFC after: 3 days
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/bge/if_bge.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index 3f9d6d2..5bddaa2 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -2475,8 +2475,15 @@ bge_dma_alloc(struct bge_softc *sc) boundary = 0; if ((sc->bge_flags & BGE_FLAG_4G_BNDRY_BUG) != 0) boundary = BGE_DMA_BNDRY; + /* + * XXX + * It seems bus_dma(9) still has issue on dealing with boundary + * restriction for dynamic buffers so disable the boundary + * restriction and limit DMA address space to 32bit. It's not + * clear whether there is another hardware issue here. + */ error = bus_dma_tag_create(bus_get_dma_tag(sc->bge_dev), - 1, boundary, lowaddr, BUS_SPACE_MAXADDR, NULL, + 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE_32BIT, 0, BUS_SPACE_MAXSIZE_32BIT, 0, NULL, NULL, &sc->bge_cdata.bge_buffer_tag); if (error != 0) { |