UFS 9 - UAP – SCSI Commands(4)

UFS 9 - UAP – SCSI Commands(4)

    • 3.8 READ CAPACITY (10) Command
      • 3.8.1 Read Capacity (10) Data Response
      • 3.8.2 Read Capacity (10) Parameter Data
      • 3.8.3 Read Capacity (10) Status Response
    • 3.9 READ CAPACITY (16) Command
      • 3.9.1 Read Capacity (16) Data Response
      • 3.9.2 Read Capacity (16) Parameter Data
      • 3.9.3 Read Capacity (16) Status Response

UFS 1-UFS架构简介1
UFS 2 -UFS架构简介2
UFS 3 - UFS RPMB
UFS 4 - UFS Boot
UFS 5 - UFS UIC Layer: MIPI M-PHY
UFS 6 - UAP – SCSI Commands(1)
UFS 7 - UAP – SCSI Commands(2)
UFS 8 - UAP – SCSI Commands(3)

3.8 READ CAPACITY (10) Command

The READ CAPACITY (10) command provides a means for the application client to discover the logical unit capacity. Refer to [SBC] for more details regarding the READ CAPACITY (10) command.
READ CAPACITY (10) 命令为应用程序客户端提供了一种发现逻辑单元容量的方法。有关 READ CAPACITY (10) 命令的更多详细信息,请参阅 [SBC]。

  • The READ CAPACITY (10) command requests that the device server transfer 8 bytes of parameter data describing the capacity and medium format of the direct-access block device
  • READ CAPACITY(10)命令请求设备服务器传输8个字节的参数数据,描述直接访问块设备的容量和介质格式
    The Command CDB shall be sent in a single COMMAND UPIU
    命令 CDB 应在单个命令 UPIU 中发送
    UFS 9 - UAP – SCSI Commands(4)_第1张图片

3.8.1 Read Capacity (10) Data Response

  • Data returned from a READ CAPACITY (10) command will be transferred to the Application Client in a single DATA IN UPIU
  • 从 READ CAPACITY (10) 命令返回的数据将被传输到 Application Client 在 UPIU 中的单个数据中
  • The Device Server will transfer 8 bytes of Capacity Data in the Data Segment area of a DATA IN UPIU
  • 设备服务器将在 DATA IN UPIU 的数据段区域传输 8 个字节的容量数据
  • Data will be returned in the indicated Read Capacity Parameter format described in the following.
  • 数据将以指定的读取容量参数格式返回,如下所述。
  • No DATA IN UPIU will be transferred if an error occurs
  • 如果发生错误,则不会传输 UPIU 中的数据

3.8.2 Read Capacity (10) Parameter Data

UFS 9 - UAP – SCSI Commands(4)_第2张图片

  • RETURNED LOGICAL BLOCK ADDRESS: last addressable block on medium under control of logical unit (LU)
  • 返回的逻辑块地址:逻辑单元 (LU) 控制下的介质上的最后一个可寻址块
    • If the number of logical blocks exceeds the maximum value that is able to be specified in the RETURNED LOGICAL BLOCK ADDRESS field, then the device server shall set the RETURNED LOGICAL BLOCK ADDRESS field to FFFF FFFFh. The application client should then issue a READ CAPACITY (16) command to request that the device server transfer the READ CAPACITY (16) parameter data to the data-in buffer.
    • 如果逻辑块的数量超过了 RETURNED LOGICAL BLOCK ADDRESS 字段中能够指定的最大值,则设备服务器应将 RETURNED LOGICAL BLOCK ADDRESS 字段设置为 FFFF FFFFh。然后,应用程序客户端应发出 READ CAPACITY (16) 命令以请求设备服务器将 READ CAPACITY (16) 参数数据传输到数据输入缓冲区。
  • LOGICAL BLOCK LENGTH IN BYTES: size of block in bytes
  • LOGICAL BLOCK LENGTH IN BYTES:块的大小,以字节为单位
    • For UFS minimum size shall be 4096 bytes

3.8.3 Read Capacity (10) Status Response

  • STATUS response will be sent in a single RESPONSE UPIU
  • STATUS 响应将在单个 RESPONSE UPIU 中发送
  • If the requested data is successfully transferred, the READ CAPACITY command will terminate with a STATUS response of GOOD
  • 如果成功传输请求的数据,READ CAPACITY 命令将终止并返回 GOOD 的 STATUS 响应
  • If the unit is not ready to accept a new command (e.g., still processing previous command) a STATUS response of BUSY will be returned
  • 如果设备未准备好接受新命令(例如,仍在处理之前的命令),将返回 BUSY 状态响应
  • Failure can occur for a number of reasons. When the READ CAPACITY command fails a STATUS response of CHECK CONDITION will be returned along with an appropriate SENSE KEY, such as
  • 失败的发生可能有多种原因。当 READ CAPACITY 命令失败时,将返回 CHECK CONDITION 的 STATUS 响应以及适当的 SENSE KEY,例如
    • ILLEGAL REQUEST (range or CDB errors)
    • HARDWARE ERROR (hardware failure)
    • UNIT ATTENTION (reset, power-on, etc.)
    • etc.

3.9 READ CAPACITY (16) Command

The READ CAPACITY (16) command provides a means for the application client to discover the logical unit capacity. Refer to [SBC] for more details regarding the READ CAPACITY (16) command.
READ CAPACITY (16) 命令为应用程序客户端提供了一种发现逻辑单元容量的方法。有关 READ CAPACITY (16) 命令的更多详细信息,请参阅 [SBC]。

  • The READ CAPACITY (16) command requests that the device server transfer 32 bytes of parameter data describing the capacity and medium format of the direct-access block device
  • READ CAPACITY(16)命令请求设备服务器传输32字节参数数据,描述直接访问块设备的容量和介质格式
    The Command CDB shall be sent in a single COMMAND UPIU.
    命令 CDB 应在单个命令 UPIU 中发送。
    UFS 9 - UAP – SCSI Commands(4)_第3张图片

3.9.1 Read Capacity (16) Data Response

  • Data returned from a READ CAPACITY (16) command will be transferred to the Application Client in a single DATA IN UPIU
  • 从 READ CAPACITY (16) 命令返回的数据将在单个 DATA IN UPIU 中传输到应用程序客户端
  • The Device Server will transfer 32 bytes of Capacity Data in the Data Segment area of a DATA IN UPIU
  • 设备服务器将在 DATA IN UPIU 的数据段区域传输 32 字节的容量数据
  • Data will be returned in the indicated Read Capacity Parameter format described in the following.
  • 数据将以指定的读取容量参数格式返回,如下所述。
  • No DATA IN UPIU will be transferred if an error occurs
  • 如果发生错误,则不会传输 UPIU 中的数据

3.9.2 Read Capacity (16) Parameter Data

UFS 9 - UAP – SCSI Commands(4)_第4张图片

  • RETURNED LOGICAL BLOCK ADDRESS: last addressable block on medium under control of logical unit (LU)
  • 返回的逻辑块地址:逻辑单元 (LU) 控制下的介质上的最后一个可寻址块
  • LOGICAL BLOCK LENGTH IN BYTES: size of block in bytes
  • LOGICAL BLOCK LENGTH IN BYTES:块的大小,以字节为单位
    • For UFS minimum size shall be 4096 bytes
    • 对于 UFS,最小大小应为 4096 字节
  • P_TYPE, PROT_EN are set to ‘0’ for UFS
  • UFS 的 P_TYPE、PROT_EN 设置为“0”
  • The P_I_EXPONENT field can be ignored for PROT_EN = ‘0’
  • 对于 PROT_EN = ‘0’,可以忽略 P_I_EXPONENT 字段
  • Logical Blocks per Physical Block Exponent (vendor-specific information)
  • 每个物理块指数的逻辑块(供应商特定信息)
    • 0: one or more physical blocks per logical block
    • 0:每个逻辑块一个或多个物理块
    • n>0: 2^n logical blocks per physical block
    • n>0:每个物理块有 2^n 个逻辑块
  • TPE is set to ‘0’ if bProvisioningType parameter in UFS Configuration Descriptor is set to 00h. TPE is set to ‘1’ if bProvisioningType is set to 02h or 03h.
  • 如果 UFS 配置描述符中的 bProvisioningType 参数设置为 00h,则 TPE 设置为“0”。如果 bProvisioningType 设置为 02h 或 03h,则 TPE 设置为“1”。
  • TPRZ value is set by bProvisioningType parameter in UFS Configuration Descriptor. If the thin provisioning read zeros (TPRZ) bit is set to one, then, for an unmapped LBA specified by a read operation, the device server shall send user data with all bits set to zero to the data in buffer. If the TPRZ bit is set to zero, then, for an unmapped LBA specified by a read operation, the device server shall send user data with all bits set to any value to the data in buffer. Lowest Aligned Logical Block Address indicates the LBA of the first logical block that is located at the beginning of a physical block (vendor-specific information)
  • TPRZ 值由 UFS 配置描述符中的 bProvisioningType 参数设置。如果精简配置读取零 (TPRZ) 位设置为 1,则对于读取操作指定的未映射 LBA,设备服务器应将所有位设置为零的用户数据发送到缓冲区中的数据。如果TPRZ位设置为0,那么,对于读操作指定的未映射LBA,设备服务器应将所有位设置为任意值的用户数据发送到缓冲区中的数据。最低对齐逻辑块地址表示位于物理块开头的第一个逻辑块的 LBA(供应商特定信息)

3.9.3 Read Capacity (16) Status Response

  • STATUS response will be sent in a single RESPONSE UPIU
  • STATUS 响应将在单个 RESPONSE UPIU 中发送
  • If the requested data is successfully transferred, the READ CAPACITY command will terminate with a STATUS response of GOOD
  • 如果成功传输请求的数据,READ CAPACITY 命令将终止并返回 GOOD 的 STATUS 响应
  • If the unit is not ready to accept a new command (e.g., still processing previous command) a STATUS response of BUSY will be returned
  • 如果设备未准备好接受新命令(例如,仍在处理之前的命令),将返回 BUSY 状态响应
  • Failure can occur for a number of reasons. When the READ CAPACITY command fails a STATUS response of CHECK CONDITION will be returned along with an appropriate SENSE KEY, such as
  • 失败的发生可能有多种原因。当 READ CAPACITY 命令失败时,将返回 CHECK CONDITION 的 STATUS 响应以及适当的 SENSE KEY,例如
    • ILLEGAL REQUEST (range or CDB errors)
    • HARDWARE ERROR (hardware failure)
    • UNIT ATTENTION (reset, power-on, etc.)
    • etc.

你可能感兴趣的:(UFS专栏,UFS,UAP,SCSI,Commands)