函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\sed-opal.c Create Date:2022-07-27 19:47:08
Last Modify:2020-03-17 23:36:33 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:lock_unlock_locking_range

函数原型:static int lock_unlock_locking_range(struct opal_dev *dev, void *data)

返回类型:int

参数:

类型参数名称
struct opal_dev *dev
void *data
1791  lkul等于data
1792  read_locked等于1, write_locked等于1
1793  err等于0
1795  如果build_locking_range(lr_buffer, lr_buffer的长度, lr)小于0则返回:负ERANGE
1800  :l_state恒等于 0001
1801  read_locked等于0
1802  write_locked等于1
1803  退出
1804  :l_state恒等于 0010
1805  read_locked等于0
1806  write_locked等于0
1807  退出
1808  :l_state恒等于 0100
1810  退出
1811  默认
1812  pr_debug("Tried to set an invalid locking state... returning to uland\n")
1813  返回:OPAL_INVAL_PARAM
1816  err等于cmd_start(dev, lr_buffer, TCG Storage SSC Methods.* Derived from: TCG_Storage_Architecture_Core_Spec_v2.01_r1.00* Section: 6.3 Assigned UIDs[OPAL_SET])
1818  add_token_u8( & err, dev, OPAL_STARTNAME)
1819  add_token_u8( & err, dev, OPAL_VALUES)
1820  add_token_u8( & err, dev, OPAL_STARTLIST)
1822  add_token_u8( & err, dev, OPAL_STARTNAME)
1823  add_token_u8( & err, dev, OPAL_READLOCKED)
1824  add_token_u8( & err, dev, read_locked)
1825  add_token_u8( & err, dev, OPAL_ENDNAME)
1827  add_token_u8( & err, dev, OPAL_STARTNAME)
1828  add_token_u8( & err, dev, OPAL_WRITELOCKED)
1829  add_token_u8( & err, dev, write_locked)
1830  add_token_u8( & err, dev, OPAL_ENDNAME)
1832  add_token_u8( & err, dev, OPAL_ENDLIST)
1833  add_token_u8( & err, dev, OPAL_ENDNAME)
1835  如果err
1836  pr_debug("Error building SET command.\n")
1837  返回:err
1840  返回:finalize_and_send(dev, Parses and checks for errors )