aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/sbp2.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-01 11:00:10 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-11 19:29:22 -0500
commit465ff3185e0cb76d46137335a4d21d0d9d3ac8a2 (patch)
tree171068cd7d99600cd094c2eb72bac712649fd9eb /drivers/ieee1394/sbp2.c
parent11c3e689f1c3a73e3af7b0ea767b1b0626da8033 (diff)
[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>
Diffstat (limited to 'drivers/ieee1394/sbp2.c')
-rw-r--r--drivers/ieee1394/sbp2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index b83d254bc86e..1eda11abeb1e 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -1963,6 +1963,12 @@ static int sbp2scsi_slave_alloc(struct scsi_device *sdev)
1963 lu->sdev = sdev; 1963 lu->sdev = sdev;
1964 sdev->allow_restart = 1; 1964 sdev->allow_restart = 1;
1965 1965
1966 /*
1967 * Update the dma alignment (minimum alignment requirements for
1968 * start and end of DMA transfers) to be a sector
1969 */
1970 blk_queue_update_dma_alignment(sdev->request_queue, 511);
1971
1966 if (lu->workarounds & SBP2_WORKAROUND_INQUIRY_36) 1972 if (lu->workarounds & SBP2_WORKAROUND_INQUIRY_36)
1967 sdev->inquiry_len = 36; 1973 sdev->inquiry_len = 36;
1968 return 0; 1974 return 0;