diff options
author | scottl <scottl@FreeBSD.org> | 2005-05-02 22:56:52 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2005-05-02 22:56:52 +0000 |
commit | 5c8c9a1aa0f1cf4c3812df527ae8eee967e3e946 (patch) | |
tree | 02cc16f779d5b5a5fa6b8786b28137ed984cc70f /sys/dev/aac | |
parent | 6d0e34daa6f88db3a09f85ad26d35a89312a3897 (diff) | |
download | FreeBSD-src-5c8c9a1aa0f1cf4c3812df527ae8eee967e3e946.zip FreeBSD-src-5c8c9a1aa0f1cf4c3812df527ae8eee967e3e946.tar.gz |
Fix some busdma API violations in the dumpsys handler.
MFC After: 3 days
Diffstat (limited to 'sys/dev/aac')
-rw-r--r-- | sys/dev/aac/aac_disk.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/aac/aac_disk.c b/sys/dev/aac/aac_disk.c index 5543e56..12c5515 100644 --- a/sys/dev/aac/aac_disk.c +++ b/sys/dev/aac/aac_disk.c @@ -265,8 +265,8 @@ aac_disk_dump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size * is too much required context. */ if (bus_dmamap_load(sc->aac_buffer_dmat, dump_datamap, virtual, - len, aac_dump_map_sg, fib, 0) != 0) - return (EIO); + len, aac_dump_map_sg, fib, BUS_DMA_NOWAIT) != 0) + return (ENOMEM); bus_dmamap_sync(sc->aac_buffer_dmat, dump_datamap, BUS_DMASYNC_PREWRITE); @@ -280,6 +280,11 @@ aac_disk_dump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size return (EIO); } + bus_dmamap_sync(sc->aac_buffer_dmat, dump_datamap, + BUS_DMASYNC_POSTWRITE); + + bus_dmamap_unload(sc->aac_buffer_dmat, dump_datamap); + length -= len; offset += len; virtual = (uint8_t *)virtual + len; |