Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\sed-opal.c Create Date:2022-07-28 18:12:11
Last Modify:2020-03-17 23:36:33 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:lock_unlock_locking_range_sum

Proto:static int lock_unlock_locking_range_sum(struct opal_dev *dev, void *data)

Type:int

Parameter:

TypeParameterName
struct opal_dev *dev
void *data
1847  read_locked = 1 , write_locked = 1
1848  lkul = data
1851  clear_opal_cmd(dev)
1852  set_comid(dev, comid)
1854  If build_locking_range(lr_buffer, size of lr_buffer , lr) < 0 Then Return -ERANGE
1859  Case l_state == 0001
1860  read_locked = 0
1861  write_locked = 1
1862  Break
1863  Case l_state == 0010
1864  read_locked = 0
1865  write_locked = 0
1866  Break
1867  Case l_state == 0100
1869  Break
1870  Default
1871  pr_debug("Tried to set an invalid locking state.\n")
1872  Return OPAL_INVAL_PARAM
1874  ret = generic_lr_enable_disable(dev, lr_buffer, 1, 1, read_locked, write_locked)
1877  If ret < 0 Then
1878  pr_debug("Error building SET command.\n")
1879  Return ret
1882  Return finalize_and_send(dev, Parses and checks for errors )