kernel/hptmv: Fix the completion of a write.
authorSascha Wildner <saw@online.de>
Fri, 7 Sep 2012 19:51:17 +0000 (21:51 +0200)
committerSascha Wildner <saw@online.de>
Fri, 7 Sep 2012 19:51:17 +0000 (21:51 +0200)
What is intended here is to perform BUS_DMASYNC_POSTWRITE when a write
is completed, but the 'else if' had the wrong check.

sys/dev/raid/hptmv/entry.c

index e998131..e053a50 100644 (file)
@@ -2934,7 +2934,7 @@ fOsCommandDone(_VBUS_ARG PCommand pCmd)
        if (pCmd->cf_data_in) {
                bus_dmamap_sync(pAdapter->io_dma_parent, pmap->dma_map, BUS_DMASYNC_POSTREAD);
        }
-       else if (pCmd->cf_data_in) {
+       else if (pCmd->cf_data_out) {
                bus_dmamap_sync(pAdapter->io_dma_parent, pmap->dma_map, BUS_DMASYNC_POSTWRITE);
        }