[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>
This commit is contained in:
@@ -824,6 +824,9 @@ static void ata_scsi_sdev_config(struct scsi_device *sdev)
|
||||
* requests.
|
||||
*/
|
||||
sdev->max_device_blocked = 1;
|
||||
|
||||
/* set the min alignment */
|
||||
blk_queue_update_dma_alignment(sdev->request_queue, ATA_DMA_PAD_SZ - 1);
|
||||
}
|
||||
|
||||
static void ata_scsi_dev_config(struct scsi_device *sdev,
|
||||
@@ -878,7 +881,7 @@ int ata_scsi_slave_config(struct scsi_device *sdev)
|
||||
if (dev)
|
||||
ata_scsi_dev_config(sdev, dev);
|
||||
|
||||
return 0; /* scsi layer doesn't check return value, sigh */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user