diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-01 11:00:10 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-11 19:29:22 -0500 |
commit | 465ff3185e0cb76d46137335a4d21d0d9d3ac8a2 (patch) | |
tree | 171068cd7d99600cd094c2eb72bac712649fd9eb /drivers/ata/libata-scsi.c | |
parent | 11c3e689f1c3a73e3af7b0ea767b1b0626da8033 (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/ata/libata-scsi.c')
-rw-r--r-- | drivers/ata/libata-scsi.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 264ae60e3fd8..4bb268b9aaeb 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -824,6 +824,9 @@ static void ata_scsi_sdev_config(struct scsi_device *sdev) | |||
824 | * requests. | 824 | * requests. |
825 | */ | 825 | */ |
826 | sdev->max_device_blocked = 1; | 826 | sdev->max_device_blocked = 1; |
827 | |||
828 | /* set the min alignment */ | ||
829 | blk_queue_update_dma_alignment(sdev->request_queue, ATA_DMA_PAD_SZ - 1); | ||
827 | } | 830 | } |
828 | 831 | ||
829 | static void ata_scsi_dev_config(struct scsi_device *sdev, | 832 | static void ata_scsi_dev_config(struct scsi_device *sdev, |
@@ -878,7 +881,7 @@ int ata_scsi_slave_config(struct scsi_device *sdev) | |||
878 | if (dev) | 881 | if (dev) |
879 | ata_scsi_dev_config(sdev, dev); | 882 | ata_scsi_dev_config(sdev, dev); |
880 | 883 | ||
881 | return 0; /* scsi layer doesn't check return value, sigh */ | 884 | return 0; |
882 | } | 885 | } |
883 | 886 | ||
884 | /** | 887 | /** |