函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-pm.c Create Date:2022-07-27 19:48:26
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:int blk_pre_runtime_suspend(struct request_queue *q)

返回类型:int

参数:

类型参数名称
struct request_queue *q
63  ret等于0
65  如果非dev则返回: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  如果判断percpu无计数引用ret等于0
90  blk_mq_unfreeze_queue(q)
92  spin_lock_irq( & queue_lock)
93  如果ret小于0则pm_runtime_mark_last_busy(dev)
95  否则rpm_status等于RPM_SUSPENDING
97  spin_unlock_irq( & queue_lock)
99  如果retblk_clear_pm_only(q)
102  返回:ret