Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:generic_table_write_data

Proto:static int generic_table_write_data(struct opal_dev *dev, const u64 data, u64 offset, u64 size, const u8 *uid)

Type:int

Parameter:

TypeParameterName
struct opal_dev *dev
const u64data
u64offset
u64size
const u8 *uid
1229  __user * src = data
1232  off = 0
1236  err = see TCG SAS 5.3.2.3 for a description of the available columns* the result is provided in dev->resp->tok[4]
1237  If err Then
1238  pr_debug("Couldn't get the table size\n")
1239  Return err
1242  len = response_get_u64( & parsed, 4)
1243  If size > len || offset > len - size Then
1244  pr_debug("Does not fit in the table (%llu vs. %llu)\n", offset + size, len)
1246  Return -ENOSPC
1250  When off < size cycle
1251  err = cmd_start(dev, uid, TCG Storage SSC Methods.* Derived from: TCG_Storage_Architecture_Core_Spec_v2.01_r1.00* Section: 6.3 Assigned UIDs[OPAL_SET])
1252  add_token_u8( & err, dev, OPAL_STARTNAME)
1253  add_token_u8( & err, dev, OPAL_WHERE)
1254  add_token_u64( & err, dev, offset + off)
1255  add_token_u8( & err, dev, OPAL_ENDNAME)
1257  add_token_u8( & err, dev, OPAL_STARTNAME)
1258  add_token_u8( & err, dev, OPAL_VALUES)
1266  len = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(remaining_size(dev) - (2 + 1 + Number of bytes needed by cmd_finalize. ), (size_t)(size - off))
1268  pr_debug("Write bytes %zu+%llu/%llu\n", off, len, size)
1270  dst = add_bytestring_header( & err, dev, len)
1271  If Not dst Then Break
1274  If copy_from_user(dst, src + off, len) Then
1275  err = -EFAULT
1276  Break
1279  pos += len
1281  add_token_u8( & err, dev, OPAL_ENDNAME)
1282  If err Then Break
1285  err = finalize_and_send(dev, Parses and checks for errors )
1286  If err Then Break
1289  off += len
1292  Return err
Caller
NameDescribe
write_shadow_mbr
write_table_data