diff options
author | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2007-11-23 04:19:00 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-11-27 03:19:40 -0500 |
commit | 05e5b136459b11cd9559370d5756719e08074fe0 (patch) | |
tree | 1e4888953d39ee1905de676b2e6e326e8faa5b57 /drivers | |
parent | c7674030e5eb83d9ba29318fb9b3ccedf84d583e (diff) |
mmc: Add missing sg_init_table() call
mmc_init_queue only initializes the scatterlists with sg_init_table()
when using a bounce buffer. This leads to a BUG() when CONFIG_DEBUG_SG
is set.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/card/queue.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index 1b9c9b6da5b7..30cd13b13ac3 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c | |||
@@ -180,12 +180,13 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock | |||
180 | blk_queue_max_hw_segments(mq->queue, host->max_hw_segs); | 180 | blk_queue_max_hw_segments(mq->queue, host->max_hw_segs); |
181 | blk_queue_max_segment_size(mq->queue, host->max_seg_size); | 181 | blk_queue_max_segment_size(mq->queue, host->max_seg_size); |
182 | 182 | ||
183 | mq->sg = kzalloc(sizeof(struct scatterlist) * | 183 | mq->sg = kmalloc(sizeof(struct scatterlist) * |
184 | host->max_phys_segs, GFP_KERNEL); | 184 | host->max_phys_segs, GFP_KERNEL); |
185 | if (!mq->sg) { | 185 | if (!mq->sg) { |
186 | ret = -ENOMEM; | 186 | ret = -ENOMEM; |
187 | goto cleanup_queue; | 187 | goto cleanup_queue; |
188 | } | 188 | } |
189 | sg_init_table(mq->sg, host->max_phys_segs); | ||
189 | } | 190 | } |
190 | 191 | ||
191 | init_MUTEX(&mq->thread_sem); | 192 | init_MUTEX(&mq->thread_sem); |