block: Add blk_set_runtime_active()
authorMika Westerberg <mika.westerberg@linux.intel.com>
Thu, 18 Feb 2016 08:54:11 +0000 (10:54 +0200)
committerTejun Heo <tj@kernel.org>
Fri, 19 Feb 2016 15:52:45 +0000 (10:52 -0500)
commitd07ab6d114774d7fcb53c57d7474aef459713451
tree05685be5ea35b0149f8ebfcd9d345d9f3ff83d35
parent15d3ce7b63bd7c0b8706d7360aa862d7b027bf8c
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>
block/blk-core.c
include/linux/blkdev.h