函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:start_generic_opal_session

函数原型:static int start_generic_opal_session(struct opal_dev *dev, enum opal_uid auth, enum opal_uid sp_type, const char *key, u8 key_len)

返回类型:int

参数:

类型参数名称
struct opal_dev *dev
enum opal_uidauth
enum opal_uidsp_type
const char *key
u8key_len
1407  如果key恒等于NULLauth不等于OPAL_ANYBODY_UID则返回:OPAL_INVAL_PARAM
1410  hsn等于GENERIC_HOST_SESSION_NUM
1411  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])
1414  add_token_u64( & err, dev, hsn)
1415  add_token_bytestring( & err, dev, opaluid[sp_type], OPAL_UID_LENGTH)
1416  add_token_u8( & err, dev, 1)
1419  :auth恒等于OPAL_ANYBODY_UID
1420  退出
1421  :auth恒等于OPAL_ADMIN1_UID
1422  :auth恒等于OPAL_SID_UID
1423  :auth恒等于OPAL_PSID_UID
1424  add_token_u8( & err, dev, OPAL_STARTNAME)
1425  add_token_u8( & err, dev, 0)
1426  add_token_bytestring( & err, dev, key, key_len)
1427  add_token_u8( & err, dev, OPAL_ENDNAME)
1428  add_token_u8( & err, dev, OPAL_STARTNAME)
1429  add_token_u8( & err, dev, 3)
1430  add_token_bytestring( & err, dev, opaluid[auth], OPAL_UID_LENGTH)
1432  add_token_u8( & err, dev, OPAL_ENDNAME)
1433  退出
1434  默认
1435  pr_debug("Cannot start Admin SP session with auth %d\n", auth)
1436  返回:OPAL_INVAL_PARAM
1439  如果err
1440  pr_debug("Error building start adminsp session command.\n")
1441  返回:err
1444  返回:finalize_and_send(dev, start_opal_session_cont)
调用者
名称描述
start_anybodyASP_opal_session
start_SIDASP_opal_session
start_admin1LSP_opal_session
start_PSID_opal_session