summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sun_esp.c
diff options
context:
space:
mode:
authorHuacai Chen <chenhc@lemote.com>2017-11-21 14:23:38 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2017-11-21 23:05:57 -0500
commit90addc6b3c9cda0146fbd62a08e234c2b224a80c (patch)
tree7cdc0b3f4b87d26c8f91125edaea8723764526bf /drivers/scsi/sun_esp.c
parent860dd4424f344400b491b212ee4acb3a358ba9d9 (diff)
downloadlinux-90addc6b3c9cda0146fbd62a08e234c2b224a80c.tar.bz2
scsi: use dma_get_cache_alignment() as minimum DMA alignment
In non-coherent DMA mode, kernel uses cache flushing operations to maintain I/O coherency, so scsi's block queue should be aligned to the value returned by dma_get_cache_alignment(). Otherwise, If a DMA buffer and a kernel structure share a same cache line, and if the kernel structure has dirty data, cache_invalidate (no writeback) will cause data corruption. Cc: stable@vger.kernel.org Signed-off-by: Huacai Chen <chenhc@lemote.com> [hch: rebased and updated the comment and changelog] Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/sun_esp.c')
0 files changed, 0 insertions, 0 deletions