diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2016-02-18 10:54:11 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2016-02-19 10:52:45 -0500 |
commit | d07ab6d114774d7fcb53c57d7474aef459713451 (patch) | |
tree | 05685be5ea35b0149f8ebfcd9d345d9f3ff83d35 /include/linux/blkdev.h | |
parent | 15d3ce7b63bd7c0b8706d7360aa862d7b027bf8c (diff) |
block: Add blk_set_runtime_active()
If block device is left runtime suspended during system suspend, resume
hook of the driver typically corrects runtime PM status of the device back
to "active" after it is resumed. However, this is not enough as queue's
runtime PM status is still "suspended". As long as it is in this state
blk_pm_peek_request() returns NULL and thus prevents new requests to be
processed.
Add new function blk_set_runtime_active() that can be used to force the
queue status back to "active" as needed.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 29189aeace19..8a77c47f8d21 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1026,6 +1026,7 @@ extern int blk_pre_runtime_suspend(struct request_queue *q); extern void blk_post_runtime_suspend(struct request_queue *q, int err); extern void blk_pre_runtime_resume(struct request_queue *q); extern void blk_post_runtime_resume(struct request_queue *q, int err); +extern void blk_set_runtime_active(struct request_queue *q); #else static inline void blk_pm_runtime_init(struct request_queue *q, struct device *dev) {} @@ -1036,6 +1037,7 @@ static inline int blk_pre_runtime_suspend(struct request_queue *q) static inline void blk_post_runtime_suspend(struct request_queue *q, int err) {} static inline void blk_pre_runtime_resume(struct request_queue *q) {} static inline void blk_post_runtime_resume(struct request_queue *q, int err) {} +extern inline void blk_set_runtime_active(struct request_queue *q) {} #endif /* |