]> git.proxmox.com Git - mirror_edk2.git/commit - MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c
MdeModulePkg/Ufs: ensure the DBC field of UTP PRDT is dword-aligned
authorFeng Tian <feng.tian@intel.com>
Tue, 18 Oct 2016 05:17:56 +0000 (13:17 +0800)
committerFeng Tian <feng.tian@intel.com>
Wed, 9 Nov 2016 07:30:10 +0000 (15:30 +0800)
commitd945390d5f154cb6664308846736e65e1f59099d
tree84d0a1a917a8c5df197e85dcf13857826e75fd37
parent008e2ccf02e7be65b3a1b48a925f005115027d1c
MdeModulePkg/Ufs: ensure the DBC field of UTP PRDT is dword-aligned

According to UFS Host Controller Spec(JESD223), the bits 1:0 of this
DataByteCount field shall be 11b to indicate Dword granularity.

But the size of UFS Request Sense Data Response defined in UFS Spec
(JESD220C) is 18 which is not Dword aligned, we would have to round
down to the multiple of 4 to fill the DBC field to avoid bring issue
on some UFS HCs.

Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c
MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c