[SCSI] aacraid: add call to flush_kernel_dcache_page
authorSalyzyn, Mark <Mark_Salyzyn@adaptec.com>
Fri, 11 Jan 2008 19:46:44 +0000 (11:46 -0800)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Wed, 23 Jan 2008 17:29:24 +0000 (11:29 -0600)
Some architectures require a call to flush_kernel_dcache_page for
processor spoofed DMA operations.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/aacraid/aachba.c

index 3cddcc0901b24a57cd778df52a5be1911eb27056..970a8d99107a78804c7a9064ab46f801aa95043d 100644 (file)
@@ -31,9 +31,9 @@
 #include <linux/slab.h>
 #include <linux/completion.h>
 #include <linux/blkdev.h>
-#include <linux/dma-mapping.h>
 #include <asm/semaphore.h>
 #include <asm/uaccess.h>
+#include <linux/highmem.h> /* For flush_kernel_dcache_page */
 
 #include <scsi/scsi.h>
 #include <scsi/scsi_cmnd.h>
@@ -366,6 +366,7 @@ static void aac_internal_transfer(struct scsi_cmnd *scsicmd, void *data, unsigne
        if (buf && transfer_len > 0)
                memcpy(buf + offset, data, transfer_len);
 
+       flush_kernel_dcache_page(kmap_atomic_to_page(buf - sg->offset));
        kunmap_atomic(buf - sg->offset, KM_IRQ0);
 
 }