audk/MdeModulePkg/Bus/Scsi/ScsiBusDxe
Yuan Yu d375273c89 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>
2023-02-02 01:58:08 +00:00
..
ComponentName.c MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ScsiBus.c MdeModulePkg: ScsiBusDxe: Refactor DiscoverScsiDevice() 2023-02-02 01:58:08 +00:00
ScsiBus.h MdeModulePkg: ScsiBusDxe: Refactor DiscoverScsiDevice() 2023-02-02 01:58:08 +00:00
ScsiBus.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
ScsiBusDxe.inf MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
ScsiBusExtra.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00