diff options
Diffstat (limited to 'drivers/mmc/card/queue.c')
-rw-r--r-- | drivers/mmc/card/queue.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index 9c0b42bfe089..4e42d030e097 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c | |||
@@ -146,7 +146,7 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock | |||
146 | } | 146 | } |
147 | 147 | ||
148 | #ifdef CONFIG_MMC_BLOCK_BOUNCE | 148 | #ifdef CONFIG_MMC_BLOCK_BOUNCE |
149 | if (host->max_hw_segs == 1) { | 149 | if (host->max_segs == 1) { |
150 | unsigned int bouncesz; | 150 | unsigned int bouncesz; |
151 | 151 | ||
152 | bouncesz = MMC_QUEUE_BOUNCESZ; | 152 | bouncesz = MMC_QUEUE_BOUNCESZ; |
@@ -196,21 +196,23 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock | |||
196 | blk_queue_bounce_limit(mq->queue, limit); | 196 | blk_queue_bounce_limit(mq->queue, limit); |
197 | blk_queue_max_hw_sectors(mq->queue, | 197 | blk_queue_max_hw_sectors(mq->queue, |
198 | min(host->max_blk_count, host->max_req_size / 512)); | 198 | min(host->max_blk_count, host->max_req_size / 512)); |
199 | blk_queue_max_segments(mq->queue, host->max_hw_segs); | 199 | blk_queue_max_segments(mq->queue, host->max_segs); |
200 | blk_queue_max_segment_size(mq->queue, host->max_seg_size); | 200 | blk_queue_max_segment_size(mq->queue, host->max_seg_size); |
201 | 201 | ||
202 | mq->sg = kmalloc(sizeof(struct scatterlist) * | 202 | mq->sg = kmalloc(sizeof(struct scatterlist) * |
203 | host->max_phys_segs, GFP_KERNEL); | 203 | host->max_segs, GFP_KERNEL); |
204 | if (!mq->sg) { | 204 | if (!mq->sg) { |
205 | ret = -ENOMEM; | 205 | ret = -ENOMEM; |
206 | goto cleanup_queue; | 206 | goto cleanup_queue; |
207 | } | 207 | } |
208 | sg_init_table(mq->sg, host->max_phys_segs); | 208 | sg_init_table(mq->sg, host->max_segs); |
209 | } | 209 | } |
210 | 210 | ||
211 | init_MUTEX(&mq->thread_sem); | 211 | sema_init(&mq->thread_sem, 1); |
212 | |||
213 | mq->thread = kthread_run(mmc_queue_thread, mq, "mmcqd/%d", | ||
214 | host->index); | ||
212 | 215 | ||
213 | mq->thread = kthread_run(mmc_queue_thread, mq, "mmcqd"); | ||
214 | if (IS_ERR(mq->thread)) { | 216 | if (IS_ERR(mq->thread)) { |
215 | ret = PTR_ERR(mq->thread); | 217 | ret = PTR_ERR(mq->thread); |
216 | goto free_bounce_sg; | 218 | goto free_bounce_sg; |