aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_lib.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/scsi/scsi_lib.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/scsi/scsi_lib.c')
-rw-r--r--drivers/scsi/scsi_lib.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index db52222885b7..de601370c05b 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1668,6 +1668,14 @@ struct request_queue *__scsi_alloc_queue(struct Scsi_Host *shost,
1668 1668
1669 if (!shost->use_clustering) 1669 if (!shost->use_clustering)
1670 clear_bit(QUEUE_FLAG_CLUSTER, &q->queue_flags); 1670 clear_bit(QUEUE_FLAG_CLUSTER, &q->queue_flags);
1671
1672 /*
1673 * set a reasonable default alignment on word boundaries: the
1674 * host and device may alter it using
1675 * blk_queue_update_dma_alignment() later.
1676 */
1677 blk_queue_dma_alignment(q, 0x03);
1678
1671 return q; 1679 return q;
1672} 1680}
1673EXPORT_SYMBOL(__scsi_alloc_queue); 1681EXPORT_SYMBOL(__scsi_alloc_queue);