diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-25 12:14:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-25 12:14:07 -0400 |
commit | 798ce8f1cca29dcc3f4b55947f611f4ffb32ac2b (patch) | |
tree | 15fba84ba4b930397c29fe562504f66211365699 /drivers/ata | |
parent | 22e12bbc9bc38c6d0bd541d061a0f547596fc19d (diff) | |
parent | 1547010e6e15a3f44f49381246421a1e19de526e (diff) |
Merge branch 'for-2.6.40/core' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.40/core' of git://git.kernel.dk/linux-2.6-block: (40 commits)
cfq-iosched: free cic_index if cfqd allocation fails
cfq-iosched: remove unused 'group_changed' in cfq_service_tree_add()
cfq-iosched: reduce bit operations in cfq_choose_req()
cfq-iosched: algebraic simplification in cfq_prio_to_maxrq()
blk-cgroup: Initialize ioc->cgroup_changed at ioc creation time
block: move bd_set_size() above rescan_partitions() in __blkdev_get()
block: call elv_bio_merged() when merged
cfq-iosched: Make IO merge related stats per cpu
cfq-iosched: Fix a memory leak of per cpu stats for root group
backing-dev: Kill set but not used var in bdi_debug_stats_show()
block: get rid of on-stack plugging debug checks
blk-throttle: Make no throttling rule group processing lockless
blk-cgroup: Make cgroup stat reset path blkg->lock free for dispatch stats
blk-cgroup: Make 64bit per cpu stats safe on 32bit arch
blk-throttle: Make dispatch stats per cpu
blk-throttle: Free up a group only after one rcu grace period
blk-throttle: Use helper function to add root throtl group to lists
blk-throttle: Introduce a helper function to fill in device details
blk-throttle: Dynamically allocate root group
blk-cgroup: Allow sleeping while dynamically allocating a group
...
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-scsi.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 30ea95f43e79..d51f9795c064 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -1089,21 +1089,21 @@ static int atapi_drain_needed(struct request *rq) | |||
1089 | static int ata_scsi_dev_config(struct scsi_device *sdev, | 1089 | static int ata_scsi_dev_config(struct scsi_device *sdev, |
1090 | struct ata_device *dev) | 1090 | struct ata_device *dev) |
1091 | { | 1091 | { |
1092 | struct request_queue *q = sdev->request_queue; | ||
1093 | |||
1092 | if (!ata_id_has_unload(dev->id)) | 1094 | if (!ata_id_has_unload(dev->id)) |
1093 | dev->flags |= ATA_DFLAG_NO_UNLOAD; | 1095 | dev->flags |= ATA_DFLAG_NO_UNLOAD; |
1094 | 1096 | ||
1095 | /* configure max sectors */ | 1097 | /* configure max sectors */ |
1096 | blk_queue_max_hw_sectors(sdev->request_queue, dev->max_sectors); | 1098 | blk_queue_max_hw_sectors(q, dev->max_sectors); |
1097 | 1099 | ||
1098 | if (dev->class == ATA_DEV_ATAPI) { | 1100 | if (dev->class == ATA_DEV_ATAPI) { |
1099 | struct request_queue *q = sdev->request_queue; | ||
1100 | void *buf; | 1101 | void *buf; |
1101 | 1102 | ||
1102 | sdev->sector_size = ATA_SECT_SIZE; | 1103 | sdev->sector_size = ATA_SECT_SIZE; |
1103 | 1104 | ||
1104 | /* set DMA padding */ | 1105 | /* set DMA padding */ |
1105 | blk_queue_update_dma_pad(sdev->request_queue, | 1106 | blk_queue_update_dma_pad(q, ATA_DMA_PAD_SZ - 1); |
1106 | ATA_DMA_PAD_SZ - 1); | ||
1107 | 1107 | ||
1108 | /* configure draining */ | 1108 | /* configure draining */ |
1109 | buf = kmalloc(ATAPI_MAX_DRAIN, q->bounce_gfp | GFP_KERNEL); | 1109 | buf = kmalloc(ATAPI_MAX_DRAIN, q->bounce_gfp | GFP_KERNEL); |
@@ -1131,8 +1131,7 @@ static int ata_scsi_dev_config(struct scsi_device *sdev, | |||
1131 | "sector_size=%u > PAGE_SIZE, PIO may malfunction\n", | 1131 | "sector_size=%u > PAGE_SIZE, PIO may malfunction\n", |
1132 | sdev->sector_size); | 1132 | sdev->sector_size); |
1133 | 1133 | ||
1134 | blk_queue_update_dma_alignment(sdev->request_queue, | 1134 | blk_queue_update_dma_alignment(q, sdev->sector_size - 1); |
1135 | sdev->sector_size - 1); | ||
1136 | 1135 | ||
1137 | if (dev->flags & ATA_DFLAG_AN) | 1136 | if (dev->flags & ATA_DFLAG_AN) |
1138 | set_bit(SDEV_EVT_MEDIA_CHANGE, sdev->supported_events); | 1137 | set_bit(SDEV_EVT_MEDIA_CHANGE, sdev->supported_events); |
@@ -1145,6 +1144,8 @@ static int ata_scsi_dev_config(struct scsi_device *sdev, | |||
1145 | scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, depth); | 1144 | scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, depth); |
1146 | } | 1145 | } |
1147 | 1146 | ||
1147 | blk_queue_flush_queueable(q, false); | ||
1148 | |||
1148 | dev->sdev = sdev; | 1149 | dev->sdev = sdev; |
1149 | return 0; | 1150 | return 0; |
1150 | } | 1151 | } |