mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 04:48:04 +09:00
@@ -91,8 +91,6 @@ static void mmc_blk_put(struct mmc_blk_data *md)
|
||||
if (!devmaj)
|
||||
devidx = md->disk->first_minor >> MMC_SHIFT;
|
||||
|
||||
blk_cleanup_queue(md->queue.queue);
|
||||
|
||||
__clear_bit(devidx, dev_use);
|
||||
|
||||
put_disk(md->disk);
|
||||
|
||||
@@ -90,10 +90,9 @@ static void mmc_request(struct request_queue *q)
|
||||
struct request *req;
|
||||
|
||||
if (!mq) {
|
||||
while ((req = blk_fetch_request(q)) != NULL) {
|
||||
req->cmd_flags |= REQ_QUIET;
|
||||
printk(KERN_ERR "MMC: killing requests for dead queue\n");
|
||||
while ((req = blk_fetch_request(q)) != NULL)
|
||||
__blk_end_request_all(req, -EIO);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -224,18 +223,17 @@ void mmc_cleanup_queue(struct mmc_queue *mq)
|
||||
struct request_queue *q = mq->queue;
|
||||
unsigned long flags;
|
||||
|
||||
/* Mark that we should start throwing out stragglers */
|
||||
spin_lock_irqsave(q->queue_lock, flags);
|
||||
q->queuedata = NULL;
|
||||
spin_unlock_irqrestore(q->queue_lock, flags);
|
||||
|
||||
/* Make sure the queue isn't suspended, as that will deadlock */
|
||||
mmc_queue_resume(mq);
|
||||
|
||||
/* Then terminate our worker thread */
|
||||
kthread_stop(mq->thread);
|
||||
|
||||
/* Empty the queue */
|
||||
spin_lock_irqsave(q->queue_lock, flags);
|
||||
q->queuedata = NULL;
|
||||
blk_start_queue(q);
|
||||
spin_unlock_irqrestore(q->queue_lock, flags);
|
||||
|
||||
if (mq->bounce_sg)
|
||||
kfree(mq->bounce_sg);
|
||||
mq->bounce_sg = NULL;
|
||||
@@ -247,6 +245,8 @@ void mmc_cleanup_queue(struct mmc_queue *mq)
|
||||
kfree(mq->bounce_buf);
|
||||
mq->bounce_buf = NULL;
|
||||
|
||||
blk_cleanup_queue(mq->queue);
|
||||
|
||||
mq->card = NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(mmc_cleanup_queue);
|
||||
|
||||
Reference in New Issue
Block a user