summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/GenFds/OptRomInfStatement.py
diff options
context:
space:
mode:
authorHeyi Guo <heyi.guo@linaro.org>2017-12-04 10:27:54 +0800
committerHao Wu <hao.a.wu@intel.com>2017-12-05 08:28:37 +0800
commit9a77210b43ef34af52ea7285fadc0ce5779306fe (patch)
tree0b15bdd594fcf7176edc7aefe9bfa461c1fdb679 /BaseTools/Source/Python/GenFds/OptRomInfStatement.py
parentc1c72a46b98159df009dfb7566cdbf49f34453ca (diff)
downloadedk2-9a77210b43ef34af52ea7285fadc0ce5779306fe.tar.gz
edk2-9a77210b43ef34af52ea7285fadc0ce5779306fe.tar.bz2
edk2-9a77210b43ef34af52ea7285fadc0ce5779306fe.zip
MdeModulePkg/NvmExpressDxe: fix error status override
Commit f6b139b added return status handling to PciIo->Mem.Write. However, the second status handling will override EFI_DEVICE_ERROR returned in this branch: // // Check the NVMe cmd execution result // if (Status != EFI_TIMEOUT) { if ((Cq->Sct == 0) && (Cq->Sc == 0)) { Status = EFI_SUCCESS; } else { Status = EFI_DEVICE_ERROR; ^^^^^^^^^^^^^^^^ Since PciIo->Mem.Write will probably return SUCCESS, it causes NvmExpressPassThru to return SUCCESS even when DEVICE_ERROR occurs. Callers of NvmExpressPassThru will then continue executing which may cause further unexpected results, e.g. DiscoverAllNamespaces couldn't break out the loop. So we save previous status before calling PciIo->Mem.Write and restore the previous one if it already contains error. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Heyi Guo <heyi.guo@linaro.org> Cc: Eric Dong <eric.dong@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/GenFds/OptRomInfStatement.py')
0 files changed, 0 insertions, 0 deletions