Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:start_auth_opal_session

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

Type:int

Parameter:

TypeParameterName
struct opal_dev *dev
void *data
1497  session = data
1499  keylen = key_len
1500  err = 0
1502  key = key
1503  hsn = GENERIC_HOST_SESSION_NUM
1505  If sum Then err = build_locking_user(lk_ul_user, size of lk_ul_user , lr)
1508  Else if who != OPAL_ADMIN1 && Not sum Then err = build_locking_user(lk_ul_user, size of lk_ul_user , who - 1)
1511  Else memcpy(lk_ul_user, opaluid[OPAL_ADMIN1_UID], OPAL_UID_LENGTH)
1514  If err Then Return err
1517  err = cmd_start(dev, opaluid[OPAL_SMUID_UID], TCG Storage SSC Methods.* Derived from: TCG_Storage_Architecture_Core_Spec_v2.01_r1.00* Section: 6.3 Assigned UIDs[OPAL_STARTSESSION])
1520  add_token_u64( & err, dev, hsn)
1521  add_token_bytestring( & err, dev, opaluid[OPAL_LOCKINGSP_UID], OPAL_UID_LENGTH)
1523  add_token_u8( & err, dev, 1)
1524  add_token_u8( & err, dev, OPAL_STARTNAME)
1525  add_token_u8( & err, dev, 0)
1526  add_token_bytestring( & err, dev, key, keylen)
1527  add_token_u8( & err, dev, OPAL_ENDNAME)
1528  add_token_u8( & err, dev, OPAL_STARTNAME)
1529  add_token_u8( & err, dev, 3)
1530  add_token_bytestring( & err, dev, lk_ul_user, OPAL_UID_LENGTH)
1531  add_token_u8( & err, dev, OPAL_ENDNAME)
1533  If err Then
1534  pr_debug("Error building STARTSESSION command.\n")
1535  Return err
1538  Return finalize_and_send(dev, start_opal_session_cont)