|
@@ -180,12 +180,13 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock
|
|
blk_queue_max_hw_segments(mq->queue, host->max_hw_segs);
|
|
blk_queue_max_hw_segments(mq->queue, host->max_hw_segs);
|
|
blk_queue_max_segment_size(mq->queue, host->max_seg_size);
|
|
blk_queue_max_segment_size(mq->queue, host->max_seg_size);
|
|
|
|
|
|
- mq->sg = kzalloc(sizeof(struct scatterlist) *
|
|
|
|
|
|
+ mq->sg = kmalloc(sizeof(struct scatterlist) *
|
|
host->max_phys_segs, GFP_KERNEL);
|
|
host->max_phys_segs, GFP_KERNEL);
|
|
if (!mq->sg) {
|
|
if (!mq->sg) {
|
|
ret = -ENOMEM;
|
|
ret = -ENOMEM;
|
|
goto cleanup_queue;
|
|
goto cleanup_queue;
|
|
}
|
|
}
|
|
|
|
+ sg_init_table(mq->sg, host->max_phys_segs);
|
|
}
|
|
}
|
|
|
|
|
|
init_MUTEX(&mq->thread_sem);
|
|
init_MUTEX(&mq->thread_sem);
|