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/firewire/fw-sbp2.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/firewire/fw-sbp2.c') diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c index 624ff3e082f6..c2169d215bf7 100644 --- a/drivers/firewire/fw-sbp2.c +++ b/drivers/firewire/fw-sbp2.c @@ -1238,6 +1238,12 @@ static int sbp2_scsi_slave_alloc(struct scsi_device *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->tgt->workarounds & SBP2_WORKAROUND_INQUIRY_36) sdev->inquiry_len = 36; -- cgit v1.2.1