mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[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 <[email protected]> Signed-off-by: James Bottomley <[email protected]>
This commit is contained in:
parent
11c3e689f1
commit
465ff3185e
5 changed files with 34 additions and 11 deletions
|
|
@ -1963,6 +1963,12 @@ static int sbp2scsi_slave_alloc(struct scsi_device *sdev)
|
|||
lu->sdev = 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->workarounds & SBP2_WORKAROUND_INQUIRY_36)
|
||||
sdev->inquiry_len = 36;
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue