diff options
author | Landon J. Fuller <landonf@FreeBSD.org> | 2018-03-29 19:48:50 +0000 |
---|---|---|
committer | Landon J. Fuller <landonf@FreeBSD.org> | 2018-03-29 19:48:50 +0000 |
commit | be9a13138e1f43e3e333f5069efd5595b6aa542d (patch) | |
tree | 23264bebaee98732ccd400b2e448ed5bee6f0e36 /sys/dev/bhnd | |
parent | b9a9e8e9bd2a76869d3787c657816283b72d5f88 (diff) | |
download | src-be9a13138e1f43e3e333f5069efd5595b6aa542d.tar.gz src-be9a13138e1f43e3e333f5069efd5595b6aa542d.zip |
bhnd(4): Use the new BHND_CAP_BP64 capability flag to exclude DMA
translations unsupported by the backplane.
Notes
Notes:
svn path=/head/; revision=331746
Diffstat (limited to 'sys/dev/bhnd')
-rw-r--r-- | sys/dev/bhnd/bhndb/bhndb.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/bhnd/bhndb/bhndb.c b/sys/dev/bhnd/bhndb/bhndb.c index c477193a4d46..af9ed008615e 100644 --- a/sys/dev/bhnd/bhndb/bhndb.c +++ b/sys/dev/bhnd/bhndb/bhndb.c @@ -2128,7 +2128,14 @@ bhndb_get_dma_translation(device_t dev, device_t child, u_int width, if (sc->bus_res->res->dma_tags == NULL) return (ENODEV); - /* Find the best matching descriptor for the requested type */ + /* Is the requested width supported? */ + if (width > BHND_DMA_ADDR_32BIT) { + /* Backplane must support 64-bit addressing */ + if (!(sc->chipid.chip_caps & BHND_CAP_BP64)) + width = BHND_DMA_ADDR_32BIT; + } + + /* Find the best matching descriptor for the requested width */ addr_mask = BHND_DMA_ADDR_BITMASK(width); match = NULL; |