When a BlockIO2 request is sent to a SCSI device, the callstack can be shown as the following diagram:
|-------------------| Create |-------------------| | BlockIO2 |--------->| BlockIO2 Event | |-------------------| |-------------------| | ^ | | Signal v | |-------------------| Create |-------------------| | ScsiDiskDxe |--------->| ScsiDiskDxe Event | |-------------------| |-------------------| | ^ | | Signal v | |-------------------| Create |-------------------| | UefiScsiLib |--------->| UefiScsiLib Event | |-------------------| |-------------------| | ^ | | Signal v | |-------------------| Create |-------------------| | ScsiBusDxe |--------->| ScsiBusDxe Event | |-------------------| |-------------------| | ^ | | Signal v | |-------------------| | | PassThru |--------------------- |-------------------| Async Scsi command completes UEFI spec requires that the BlockIO2 event will not be signaled when error status is returned. Therefore, this patch series will modify the behavior of ScsiDiskDxe, UefiScsiLib and ScsiBusDxe to follow the spec. Hao Wu (3): MdeModulePkg ScsiBusDxe: Only signal caller event when PassThru() succeeds MdePkg UefiScsiLib: Close event when SCSI command fails MdeModulePkg ScsiDiskDxe: Close event when SCSI command fails MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c | 5 +-- MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c | 24 ++++++++++++++ MdePkg/Library/UefiScsiLib/UefiScsiLib.c | 48 +++++++++++++++++++++++++--- 3 files changed, 71 insertions(+), 6 deletions(-) -- 1.9.5.msysgit.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel