- Status = ScsiIoDevice->ExtScsiPassThru->PassThru (\r
- ScsiIoDevice->ExtScsiPassThru,\r
- Target,\r
- ScsiIoDevice->Lun,\r
- ExtRequestPacket,\r
- Event\r
- );\r
+\r
+ if (((ScsiIoDevice->ExtScsiPassThru->Mode->Attributes & EFI_SCSI_PASS_THRU_ATTRIBUTES_NONBLOCKIO) != 0) && (Event != NULL)) {\r
+ Status = ScsiIoDevice->ExtScsiPassThru->PassThru (\r
+ ScsiIoDevice->ExtScsiPassThru,\r
+ Target,\r
+ ScsiIoDevice->Lun,\r
+ ExtRequestPacket,\r
+ Event\r
+ );\r
+ } else {\r
+ //\r
+ // If there's no event or the SCSI Device doesn't support NON-BLOCKING,\r
+ // let the 'Event' parameter for PassThru() be NULL.\r
+ //\r
+ Status = ScsiIoDevice->ExtScsiPassThru->PassThru (\r
+ ScsiIoDevice->ExtScsiPassThru,\r
+ Target,\r
+ ScsiIoDevice->Lun,\r
+ ExtRequestPacket,\r
+ NULL\r
+ );\r
+ if ((!EFI_ERROR(Status)) && (Event != NULL)) {\r
+ //\r
+ // Signal Event to tell caller to pick up the SCSI IO packet if the\r
+ // PassThru() succeeds.\r
+ //\r
+ gBS->SignalEvent (Event);\r
+ }\r
+ }\r