Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:cmd_finalize

Proto:static int cmd_finalize(struct opal_dev *cmd, unsigned int hsn, unsigned int tsn)

Type:int

Parameter:

TypeParameterName
struct opal_dev *cmd
unsigned inthsn
unsigned inttsn
689  err = 0
696  add_token_u8( & err, cmd, OPAL_ENDLIST)
698  add_token_u8( & err, cmd, OPAL_ENDOFDATA)
699  add_token_u8( & err, cmd, OPAL_STARTLIST)
700  add_token_u8( & err, cmd, 0)
701  add_token_u8( & err, cmd, 0)
702  add_token_u8( & err, cmd, 0)
703  add_token_u8( & err, cmd, OPAL_ENDLIST)
705  If err Then
706  pr_debug("Error finalizing command.\n")
707  Return -EFAULT
710  hdr = cmd
712  tsn = cpu_to_be32(tsn)
713  hsn = cpu_to_be32(hsn)
715  length = cpu_to_be32(pos - size of hdr )
716  When pos % 4 cycle
717  If pos >= IO_BUFFER_LENGTH Then
718  pr_debug("Error: Buffer overrun\n")
719  Return -ERANGE
721  cmd[pos++] = 0
723  length = cpu_to_be32(pos - size of cp - size of pkt )
725  length = cpu_to_be32(pos - size of cp )
727  Return 0
Caller
NameDescribe
finalize_and_send