1BLK_PRE_RUNTIME_SUSP(9)          Block Devices         BLK_PRE_RUNTIME_SUSP(9)
2
3
4

NAME

6       blk_pre_runtime_suspend - Pre runtime suspend check
7

SYNOPSIS

9       int blk_pre_runtime_suspend(struct request_queue * q);
10

ARGUMENTS

12       q
13           the queue of the device
14

DESCRIPTION

16       This function will check if runtime suspend is allowed for the device
17       by examining if there are any requests pending in the queue. If there
18       are requests pending, the device can not be runtime suspended;
19       otherwise, the queue's status will be updated to SUSPENDING and the
20       driver can proceed to suspend the device.
21
22       For the not allowed case, we mark last busy for the device so that
23       runtime PM core will try to autosuspend it some time later.
24
25       This function should be called near the start of the device's
26       runtime_suspend callback.
27

RETURN

29       0 - OK to runtime suspend the device -EBUSY - Device should not be
30       runtime suspended
31
33Kernel Hackers Manual 3.10         June 2019           BLK_PRE_RUNTIME_SUSP(9)
Impressum