diff options
author | Justin Hibbits <jhibbits@FreeBSD.org> | 2022-01-04 15:22:04 +0000 |
---|---|---|
committer | Justin Hibbits <jhibbits@FreeBSD.org> | 2022-01-04 15:24:03 +0000 |
commit | 3a9688f8bc488b16bf5676057fa86263554312b0 (patch) | |
tree | 08474a713c52349d07315c1bb85a59545950e483 | |
parent | ad07e93fe10baf9228b809997da3cf817486b018 (diff) | |
download | src-3a9688f8bc488b16bf5676057fa86263554312b0.tar.gz src-3a9688f8bc488b16bf5676057fa86263554312b0.zip |
busdma: Fix powerpc DMA alignment check
The original logic was to check if there's no filter and the address is
misaligned relative to the requirements. The refactoring in
c606ab59e7f9423f7027320e9a4514c7db39658d missed this, and instead caused
it to return failure if the address *is* properly aligned.
-rw-r--r-- | sys/powerpc/powerpc/busdma_machdep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/powerpc/powerpc/busdma_machdep.c b/sys/powerpc/powerpc/busdma_machdep.c index f75d3e1efcf9..95eb98a5cbab 100644 --- a/sys/powerpc/powerpc/busdma_machdep.c +++ b/sys/powerpc/powerpc/busdma_machdep.c @@ -172,7 +172,7 @@ run_filter(bus_dma_tag_t dmat, bus_addr_t paddr) paddr > dmat->lowaddr && paddr <= dmat->highaddr) retval = 1; if (dmat->filter == NULL && - vm_addr_align_ok(paddr, dmat->alignment)) + !vm_addr_align_ok(paddr, dmat->alignment)) retval = 1; if (dmat->filter != NULL && (*dmat->filter)(dmat->filterarg, paddr) != 0) |