Merge "mmc: queue: Fix bug in mmc_queue_suspend() for CMDQ case"
This commit is contained in:
commit
0dcd2def74
|
@ -1510,8 +1510,11 @@ clear_dcmd:
|
|||
out:
|
||||
blk_end_request(req, err, blk_rq_bytes(req));
|
||||
|
||||
if (test_and_clear_bit(0, &ctx_info->req_starved))
|
||||
if (test_and_clear_bit(0, &ctx_info->req_starved)) {
|
||||
blk_run_queue(mq->queue);
|
||||
if (blk_queue_stopped(mq->queue))
|
||||
wake_up_process(mq->thread);
|
||||
}
|
||||
mmc_release_host(host);
|
||||
mmc_rpm_release(host, &card->dev);
|
||||
return err ? 1 : 0;
|
||||
|
@ -1642,8 +1645,11 @@ clear_dcmd:
|
|||
out:
|
||||
blk_end_request(req, err, blk_rq_bytes(req));
|
||||
|
||||
if (test_and_clear_bit(0, &ctx_info->req_starved))
|
||||
if (test_and_clear_bit(0, &ctx_info->req_starved)) {
|
||||
blk_run_queue(mq->queue);
|
||||
if (blk_queue_stopped(mq->queue))
|
||||
wake_up_process(mq->thread);
|
||||
}
|
||||
mmc_release_host(host);
|
||||
mmc_rpm_release(host, &card->dev);
|
||||
return err ? 1 : 0;
|
||||
|
@ -3174,8 +3180,11 @@ out:
|
|||
host->err_mrq = NULL;
|
||||
mmc_rpm_release(host, &card->dev);
|
||||
|
||||
if (test_and_clear_bit(0, &ctx_info->req_starved))
|
||||
if (test_and_clear_bit(0, &ctx_info->req_starved)) {
|
||||
blk_run_queue(q);
|
||||
if (blk_queue_stopped(mq->queue))
|
||||
wake_up_process(mq->thread);
|
||||
}
|
||||
}
|
||||
|
||||
/* invoked by block layer in softirq context */
|
||||
|
@ -3235,8 +3244,11 @@ out:
|
|||
}
|
||||
|
||||
if (!test_bit(CMDQ_STATE_ERR, &ctx_info->curr_state) &&
|
||||
test_and_clear_bit(0, &ctx_info->req_starved))
|
||||
test_and_clear_bit(0, &ctx_info->req_starved)) {
|
||||
blk_run_queue(mq->queue);
|
||||
if (blk_queue_stopped(mq->queue))
|
||||
wake_up_process(mq->thread);
|
||||
}
|
||||
mmc_release_host(host);
|
||||
mmc_rpm_release(host, &host->card->dev);
|
||||
|
||||
|
|
|
@ -777,6 +777,8 @@ int mmc_queue_suspend(struct mmc_queue *mq, int wait)
|
|||
spin_lock_irqsave(q->queue_lock, flags);
|
||||
blk_start_queue(q);
|
||||
spin_unlock_irqrestore(q->queue_lock, flags);
|
||||
if (!rc)
|
||||
up(&mq->thread_sem);
|
||||
rc = -EBUSY;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue