Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:opal_discovery0_end

Proto:static int opal_discovery0_end(struct opal_dev *dev)

Type:int

Parameter:

TypeParameterName
struct opal_dev *dev
431  bool found_com_id = TSC's on different sockets may be reset asynchronously.* This may cause the TSC ADJUST value on socket 0 to be NOT 0., supported = true, single_user = false
432  hdr = resp
433  epos = resp , cpos = resp
434  comid = 0
435  hlen = be32_to_cpu(he length of the header 48 in 2.00.100 )
437  print_buffer(resp, hlen)
438  mbr_enabled = false
440  If hlen > IO_BUFFER_LENGTH - size of hdr Then
441  pr_debug("Discovery length overflows buffer (%zu+%u)/%u\n", size of hdr , hlen, IO_BUFFER_LENGTH)
443  Return -EFAULT
446  epos += hlen
447  cpos += size of hdr
449  When cpos < epos && supported cycle
450  body = cpos
454  Case be16_to_cpu(code) == FC_TPER
456  Break
457  Case be16_to_cpu(code) == FC_SINGLEUSER
459  Break
460  Case be16_to_cpu(code) == FC_GEOMETRY
462  Break
463  Case be16_to_cpu(code) == FC_LOCKING
465  Break
466  Case be16_to_cpu(code) == FC_ENTERPRISE
467  Case be16_to_cpu(code) == FC_DATASTORE
469  pr_debug("Found OPAL feature description: %d\n", be16_to_cpu(code))
471  Break
472  Case be16_to_cpu(code) == FC_OPALV100
474  found_com_id = true
475  Break
476  Case be16_to_cpu(code) == FC_OPALV200
478  found_com_id = true
479  Break
480  Case be16_to_cpu(code) == 0xbfff...0xffff
482  Break
483  Default
484  pr_debug("OPAL Unknown feature: %d\n", be16_to_cpu(code))
488  cpos += length + 4
491  If Not supported Then
492  pr_debug("This device is not Opal enabled. Not Supported!\n")
493  Return -EOPNOTSUPP
496  If Not single_user Then pr_debug("Device doesn't support single user mode\n")
500  If Not found_com_id Then
501  pr_debug("Could not find OPAL comid for device. Returning early\n")
502  Return -EOPNOTSUPP
505  comid = comid
507  Return 0
Caller
NameDescribe
opal_discovery0