summaryrefslogtreecommitdiffstats
path: root/ShellPkg
diff options
context:
space:
mode:
authorYuan Yu <yuanyu@google.com>2023-01-31 14:03:47 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-02-02 01:58:08 +0000
commitd375273c899bfa279c2732c509caf455af285006 (patch)
tree7703a4db6a2bd45732f5694a9667b7793cd992a2 /ShellPkg
parentbda715bf6d7cf565ccd4eda1f48e850ab8e2d452 (diff)
downloadedk2-d375273c899bfa279c2732c509caf455af285006.tar.gz
edk2-d375273c899bfa279c2732c509caf455af285006.tar.bz2
edk2-d375273c899bfa279c2732c509caf455af285006.zip
MdeModulePkg: ScsiBusDxe: Refactor DiscoverScsiDevice()
Currently DiscoverScsiDevice() returns a boolean which cannot distinguish a "not found" situation from a real problem like memory allocation failures. This patch changes the return value to an EFI_STATUS so that when memory allocation fails, it will return EFI_OUT_OF_RESOURCES. Without this change, any FALSE returned by DiscoverScsiDevice() will result in EFI_OUT_OF_RESOURCES being returned by ScsiScanCreateDevice(), which will cause a while loop in SCSIBusDriverBindingStart() to abort before other possible Puns in the SCSI channel are scanned, which means good devices may not have a chance to be discovered. If this good device is the boot device, boot will fail. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Sivaparvathi chellaiah <sivaparvathic@ami.com> Signed-off-by: Yuan Yu <yuanyu@google.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Diffstat (limited to 'ShellPkg')
0 files changed, 0 insertions, 0 deletions