mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/Ufs: Set 'Data Segment Length' field for Write Descriptor
According to the Universal Flash Storage (UFS) Version 2.1 (JESD220C) spec Section 10.7.8.5, the DATA SEGMENT LENGTH field of the UPIU shall also be set to number of descriptor bytes to write. The origin codes miss the above operation. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
parent
32c9049de1
commit
c16eee92d4
|
@ -407,6 +407,9 @@ UfsInitQueryRequestUpiu (
|
|||
|
||||
if (Opcode == UtpQueryFuncOpcodeWrDesc) {
|
||||
CopyMem (QueryReq + 1, Data, DataSize);
|
||||
|
||||
SwapLittleEndianToBigEndian ((UINT8*)&DataSize, sizeof (UINT16));
|
||||
QueryReq->DataSegLen = (UINT16)DataSize;
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
|
|
@ -478,6 +478,9 @@ UfsInitQueryRequestUpiu (
|
|||
|
||||
if (Opcode == UtpQueryFuncOpcodeWrDesc) {
|
||||
CopyMem (QueryReq + 1, Data, DataSize);
|
||||
|
||||
SwapLittleEndianToBigEndian ((UINT8*)&DataSize, sizeof (UINT16));
|
||||
QueryReq->DataSegLen = (UINT16)DataSize;
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
|
Loading…
Reference in New Issue