Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-pm.c Create Date:2022-07-28 18:13:29
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:lk_pre_runtime_suspend - Pre runtime suspend check*@q: the queue of the device* Description:* This function will check if runtime suspend is allowed for the device* by examining if there are any requests pending in the queue

Proto:int blk_pre_runtime_suspend(struct request_queue *q)

Type:int

Parameter:

TypeParameterName
struct request_queue *q
63  ret = 0
65  If Not dev Then Return ret
68  WARN_ON_ONCE(rpm_status != RPM_ACTIVE)
76  lk_set_pm_only - increment pm_only counter*@q: request queue pointer
77  ret = -EBUSY
79  blk_freeze_queue_start(q)
86  percpu_ref_switch_to_atomic_sync - switch a percpu_ref to atomic mode*@ref: percpu_ref to switch to atomic mode* Schedule switching the ref to atomic mode, and wait for the* switch to complete. Caller must ensure that no other thread
87  If percpu_ref_is_zero - test whether a percpu refcount reached zero*@ref: percpu_ref to test* Returns %true if @ref reached zero.* This function is safe to call as long as @ref is between init and exit. Then ret = 0
90  blk_mq_unfreeze_queue(q)
92  spin_lock_irq( & queue_lock)
93  If ret < 0 Then pm_runtime_mark_last_busy(dev)
95  Else rpm_status = RPM_SUSPENDING
97  spin_unlock_irq( & queue_lock)
99  If ret Then blk_clear_pm_only(q)
102  Return ret