* MPT Fusion SAS dma alignment problem
@ 2008-05-28 8:14 Ilya Yanok
0 siblings, 0 replies; only message in thread
From: Ilya Yanok @ 2008-05-28 8:14 UTC (permalink / raw)
To: linux-scsi, DL-MPTFusionLinux
Hello, All.
We've experienced problem with MPT Fusion SAS driver: running smartctl
program from smartmontools package resulted in memory corruption after
ioctl(SG_IO) call. My investigation showed that problem was introduced by
Commit: 465ff3185e0cb76d46137335a4d21d0d9d3ac8a2
Author: James Bottomley <James.Bottomley@HansenPartnership.com> Tue, 01
Jan 2008
[SCSI] relax scsi dma alignment
This patch relaxes the default SCSI DMA alignment from 512 bytes to 4
bytes. I remember from previous discussions that usb and firewire have
sector size alignment requirements, so I upped their alignments in the
respective slave allocs.
The reason for doing this is so that we don't get such a huge amount of
copy overhead in bio_copy_user() for udev. (basically all inquiries it
issues can now be directly mapped).
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
so I've just added call to blk_queue_update_dma_alignment() (see patch
below) but I'm not sure that it'a right (or full) solution. Maybe
someone more familiar with this driver can comment?
--
Ilya
---
drivers/message/fusion/mptsas.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/message/fusion/mptsas.c
b/drivers/message/fusion/mptsas.c
index 4684807..bbb6186 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -1000,6 +1000,7 @@ mptsas_slave_alloc(struct scsi_device *sdev)
return -ENXIO;
out:
+ blk_queue_update_dma_alignment(sdev->request_queue, 511);
vdevice->vtarget->num_luns++;
sdev->hostdata = vdevice;
return 0;
--
1.5.5.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-05-28 8:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-28 8:14 MPT Fusion SAS dma alignment problem Ilya Yanok
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.