diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/libata-scsi.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 4bb268b9aaeb..bc5cf6b8a4b8 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -824,9 +824,6 @@ 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); | ||
830 | } | 827 | } |
831 | 828 | ||
832 | static void ata_scsi_dev_config(struct scsi_device *sdev, | 829 | static void ata_scsi_dev_config(struct scsi_device *sdev, |
@@ -842,7 +839,14 @@ static void ata_scsi_dev_config(struct scsi_device *sdev, | |||
842 | if (dev->class == ATA_DEV_ATAPI) { | 839 | if (dev->class == ATA_DEV_ATAPI) { |
843 | struct request_queue *q = sdev->request_queue; | 840 | struct request_queue *q = sdev->request_queue; |
844 | blk_queue_max_hw_segments(q, q->max_hw_segments - 1); | 841 | blk_queue_max_hw_segments(q, q->max_hw_segments - 1); |
845 | } | 842 | |
843 | /* set the min alignment */ | ||
844 | blk_queue_update_dma_alignment(sdev->request_queue, | ||
845 | ATA_DMA_PAD_SZ - 1); | ||
846 | } else | ||
847 | /* ATA devices must be sector aligned */ | ||
848 | blk_queue_update_dma_alignment(sdev->request_queue, | ||
849 | ATA_SECT_SIZE - 1); | ||
846 | 850 | ||
847 | if (dev->flags & ATA_DFLAG_AN) | 851 | if (dev->flags & ATA_DFLAG_AN) |
848 | set_bit(SDEV_EVT_MEDIA_CHANGE, sdev->supported_events); | 852 | set_bit(SDEV_EVT_MEDIA_CHANGE, sdev->supported_events); |