Fix some busdma API violations in the dumpsys handler.

MFC After: 3 days
This commit is contained in:
Scott Long 2005-05-02 22:56:52 +00:00
parent 683cd8e85a
commit cbe4fd54ef

View File

@ -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;