mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
Revert "blk-mq: return if queue is frozen via current blk_freeze_queue_start" [3/7]
This reverts commit 0bb3f8652db627f3f92a5c4340d326cb787eee3a. Reason for revert: this patchset is either mismerged or incomplete. UFS may fail to resume from suspend with the log containing these lines: [23703.703882] scsi host0: runtime PM trying to activate child device host0 but parent (1d84000.ufshc) is not active [23703.703977] scsi target0:0:0: runtime PM trying to activate child device target0:0:0 but parent (host0) is not active [23703.704369] sd 0:0:0:0: runtime PM trying to activate child device 0:0:0:0 but parent (target0:0:0) is not active [23703.704380] scsi 0:0:0:49488: runtime PM trying to activate child device 0:0:0:49488 but parent (target0:0:0) is not active [23703.704470] sd 0:0:0:3: runtime PM trying to activate child device 0:0:0:3 but parent (target0:0:0) is not active [23703.704478] sd 0:0:0:5: runtime PM trying to activate child device 0:0:0:5 but parent (target0:0:0) is not active [23703.704557] sd 0:0:0:1: runtime PM trying to activate child device 0:0:0:1 but parent (target0:0:0) is not active [23703.704565] scsi 0:0:0:49476: runtime PM trying to activate child device 0:0:0:49476 but parent (target0:0:0) is not active [23703.704643] sd 0:0:0:4: runtime PM trying to activate child device 0:0:0:4 but parent (target0:0:0) is not active [23703.704651] scsi 0:0:0:49456: runtime PM trying to activate child device 0:0:0:49456 but parent (target0:0:0) is not active [23703.704722] sd 0:0:0:2: runtime PM trying to activate child device 0:0:0:2 but parent (target0:0:0) is not active This shoudn't be a problem [1], but the device becomes unresponsive until forced reboot is done by holding power button. [1] https://lkml.org/lkml/2020/11/13/2 Test: the mentioned kernel messages do not cause any issue Change-Id: Ie0c93912541db39e3ea09871243172b4f182043c Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
This commit is contained in:
parent
82a0bf27e1
commit
1282f7f4c8
@ -134,7 +134,7 @@ void blk_mq_in_flight_rw(struct request_queue *q, struct hd_struct *part,
|
||||
blk_mq_queue_tag_busy_iter(q, blk_mq_check_inflight_rw, &mi);
|
||||
}
|
||||
|
||||
bool blk_freeze_queue_start(struct request_queue *q)
|
||||
void blk_freeze_queue_start(struct request_queue *q)
|
||||
{
|
||||
int freeze_depth;
|
||||
|
||||
@ -143,9 +143,7 @@ bool blk_freeze_queue_start(struct request_queue *q)
|
||||
percpu_ref_kill(&q->q_usage_counter);
|
||||
if (q->mq_ops)
|
||||
blk_mq_run_hw_queues(q, false);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(blk_freeze_queue_start);
|
||||
|
||||
@ -168,7 +166,7 @@ EXPORT_SYMBOL_GPL(blk_mq_freeze_queue_wait_timeout);
|
||||
* Guarantee no request is in use, so we can change any data structure of
|
||||
* the queue afterward.
|
||||
*/
|
||||
bool blk_freeze_queue(struct request_queue *q)
|
||||
void blk_freeze_queue(struct request_queue *q)
|
||||
{
|
||||
/*
|
||||
* In the !blk_mq case we are only calling this to kill the
|
||||
@ -177,20 +175,19 @@ bool blk_freeze_queue(struct request_queue *q)
|
||||
* no blk_unfreeze_queue(), and blk_freeze_queue() is not
|
||||
* exported to drivers as the only user for unfreeze is blk_mq.
|
||||
*/
|
||||
bool ret = blk_freeze_queue_start(q);
|
||||
blk_freeze_queue_start(q);
|
||||
if (!q->mq_ops)
|
||||
blk_drain_queue(q);
|
||||
blk_mq_freeze_queue_wait(q);
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool blk_mq_freeze_queue(struct request_queue *q)
|
||||
void blk_mq_freeze_queue(struct request_queue *q)
|
||||
{
|
||||
/*
|
||||
* ...just an alias to keep freeze and unfreeze actions balanced
|
||||
* in the blk_mq_* namespace
|
||||
*/
|
||||
return blk_freeze_queue(q);
|
||||
blk_freeze_queue(q);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(blk_mq_freeze_queue);
|
||||
|
||||
|
@ -40,6 +40,7 @@ enum mq_rq_state {
|
||||
MQ_RQ_GEN_INC = 1 << MQ_RQ_STATE_BITS,
|
||||
};
|
||||
|
||||
void blk_mq_freeze_queue(struct request_queue *q);
|
||||
void blk_mq_free_queue(struct request_queue *q);
|
||||
int blk_mq_update_nr_requests(struct request_queue *q, unsigned int nr);
|
||||
void blk_mq_wake_waiters(struct request_queue *q);
|
||||
|
@ -66,7 +66,7 @@ void blk_rq_bio_prep(struct request_queue *q, struct request *rq,
|
||||
void blk_queue_bypass_start(struct request_queue *q);
|
||||
void blk_queue_bypass_end(struct request_queue *q);
|
||||
void __blk_queue_free_tags(struct request_queue *q);
|
||||
bool blk_freeze_queue(struct request_queue *q);
|
||||
void blk_freeze_queue(struct request_queue *q);
|
||||
|
||||
static inline void blk_queue_enter_live(struct request_queue *q)
|
||||
{
|
||||
|
@ -259,9 +259,9 @@ bool blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async);
|
||||
void blk_mq_run_hw_queues(struct request_queue *q, bool async);
|
||||
void blk_mq_tagset_busy_iter(struct blk_mq_tag_set *tagset,
|
||||
busy_tag_iter_fn *fn, void *priv);
|
||||
bool blk_mq_freeze_queue(struct request_queue *q);
|
||||
void blk_mq_freeze_queue(struct request_queue *q);
|
||||
void blk_mq_unfreeze_queue(struct request_queue *q);
|
||||
bool blk_freeze_queue_start(struct request_queue *q);
|
||||
void blk_freeze_queue_start(struct request_queue *q);
|
||||
void blk_mq_freeze_queue_wait(struct request_queue *q);
|
||||
int blk_mq_freeze_queue_wait_timeout(struct request_queue *q,
|
||||
unsigned long timeout);
|
||||
|
Loading…
x
Reference in New Issue
Block a user