[PATCH 1/1] aacraid: add call to flush_kernel_dcache_page for architectures that require it.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Some architectures require a call to flush_kernel_dcache_page for processor spoofed DMA operations.

This attached patch is against current scsi-misc-2.6.

ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments (inline gets damaged, use attachment).

Signed-off-by: Mark Salyzyn <aacraid@xxxxxxxxxxx>

 aachba.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff -ru a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
--- a/drivers/scsi/aacraid/aachba.c     2008-01-08 15:01:21.503932722 -0500
+++ b/drivers/scsi/aacraid/aachba.c     2008-01-08 15:02:35.849634368 -0500
@@ -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,9 @@
        if (buf && transfer_len > 0)
                memcpy(buf + offset, data, transfer_len);

+#ifdef ARCH_HAS_FLUSH_ANON_PAGE
+       flush_kernel_dcache_page(kmap_atomic_to_page(buf - sg->offset));
+#endif
        kunmap_atomic(buf - sg->offset, KM_IRQ0);

 }

Sincerely -- Mark Salyzyn

Attachment: aacraid_flush_dcache3.patch
Description: aacraid_flush_dcache3.patch


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux