aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorPyun YongHyeon <yongari@FreeBSD.org>2010-11-05 18:19:54 +0000
committerPyun YongHyeon <yongari@FreeBSD.org>2010-11-05 18:19:54 +0000
commit66366ca4bfc131cc2af441e7178cdf60997bcf9b (patch)
treefb0192d95da8c563565fb58a8f9ce7663e1a054b /sys/dev
parent0108cce0a4d60d00a34255f0ad17df3d01a05911 (diff)
downloadsrc-66366ca4bfc131cc2af441e7178cdf60997bcf9b.tar.gz
src-66366ca4bfc131cc2af441e7178cdf60997bcf9b.zip
Enable 64bit DMA addressing for RTL810xE/RTL8168/RTL8111 PCIe
controllers. Some old PCI controllers may work with DAC but it was known to be buggy so 64bit DMA addressing is used only on PCIe controllers.
Notes
Notes: svn path=/head/; revision=214840
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/re/if_re.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c
index 8fd20b6a8327..f774e7114af0 100644
--- a/sys/dev/re/if_re.c
+++ b/sys/dev/re/if_re.c
@@ -934,6 +934,7 @@ re_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error)
static int
re_allocmem(device_t dev, struct rl_softc *sc)
{
+ bus_addr_t lowaddr;
bus_size_t rx_list_size, tx_list_size;
int error;
int i;
@@ -947,10 +948,13 @@ re_allocmem(device_t dev, struct rl_softc *sc)
* register should be set. However some RealTek chips are known
* to be buggy on DAC handling, therefore disable DAC by limiting
* DMA address space to 32bit. PCIe variants of RealTek chips
- * may not have the limitation but I took safer path.
+ * may not have the limitation.
*/
+ lowaddr = BUS_SPACE_MAXADDR;
+ if ((sc->rl_flags & RL_FLAG_PCIE) == 0)
+ lowaddr = BUS_SPACE_MAXADDR_32BIT;
error = bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0,
- BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
+ lowaddr, BUS_SPACE_MAXADDR, NULL, NULL,
BUS_SPACE_MAXSIZE_32BIT, 0, BUS_SPACE_MAXSIZE_32BIT, 0,
NULL, NULL, &sc->rl_parent_tag);
if (error) {