aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-scsi.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2008-03-04 05:18:17 -0500
committerJens Axboe <jens.axboe@oracle.com>2008-03-04 05:18:17 -0500
commite3790c7d42a545e8fe8b38b513613ca96687b670 (patch)
tree0b849ba46007c4d7f7a34271a76d58e7406cbad7 /drivers/ata/libata-scsi.c
parent7a85f8896f4b4a4a0249563b92af9e3161a6b467 (diff)
block: separate out padding from alignment
Block layer alignment was used for two different purposes - memory alignment and padding. This causes problems in lower layers because drivers which only require memory alignment ends up with adjusted rq->data_len. Separate out padding such that padding occurs iff driver explicitly requests it. Tomo: restorethe code to update bio in blk_rq_map_user introduced by the commit 40b01b9bbdf51ae543a04744283bf2d56c4a6afa according to padding alignment. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/ata/libata-scsi.c')
-rw-r--r--drivers/ata/libata-scsi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index fe47922dd69e..8f0e8f2bc628 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -862,9 +862,10 @@ static int ata_scsi_dev_config(struct scsi_device *sdev,
862 struct request_queue *q = sdev->request_queue; 862 struct request_queue *q = sdev->request_queue;
863 void *buf; 863 void *buf;
864 864
865 /* set the min alignment */ 865 /* set the min alignment and padding */
866 blk_queue_update_dma_alignment(sdev->request_queue, 866 blk_queue_update_dma_alignment(sdev->request_queue,
867 ATA_DMA_PAD_SZ - 1); 867 ATA_DMA_PAD_SZ - 1);
868 blk_queue_dma_pad(sdev->request_queue, ATA_DMA_PAD_SZ - 1);
868 869
869 /* configure draining */ 870 /* configure draining */
870 buf = kmalloc(ATAPI_MAX_DRAIN, q->bounce_gfp | GFP_KERNEL); 871 buf = kmalloc(ATAPI_MAX_DRAIN, q->bounce_gfp | GFP_KERNEL);