From 465ff3185e0cb76d46137335a4d21d0d9d3ac8a2 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Tue, 1 Jan 2008 10:00:10 -0600 Subject: [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 Signed-off-by: James Bottomley --- drivers/ieee1394/sbp2.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/ieee1394') diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index b83d254..1eda11a 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c @@ -1963,6 +1963,12 @@ static int sbp2scsi_slave_alloc(struct scsi_device *sdev) lu->sdev = sdev; sdev->allow_restart = 1; + /* + * Update the dma alignment (minimum alignment requirements for + * start and end of DMA transfers) to be a sector + */ + blk_queue_update_dma_alignment(sdev->request_queue, 511); + if (lu->workarounds & SBP2_WORKAROUND_INQUIRY_36) sdev->inquiry_len = 36; return 0; -- cgit v1.1