106 if (Buffer !=
NULL) {
136 &gSCSIBusDriverBinding,
138 &gScsiBusComponentName,
139 &gScsiBusComponentName2
180 TargetId = &ScsiTargetId.ScsiId.ExtScsi[0];
181 SetMem (TargetId, TARGET_MAX_BYTES, 0xFF);
188 Status =
gBS->OpenProtocol (
190 &gEfiExtScsiPassThruProtocolGuid,
191 (VOID **)&ExtPassThru,
192 This->DriverBindingHandle,
194 EFI_OPEN_PROTOCOL_BY_DRIVER
197 if (Status == EFI_ALREADY_STARTED) {
199 }
else if (!EFI_ERROR (Status)) {
210 &gEfiExtScsiPassThruProtocolGuid,
211 This->DriverBindingHandle,
219 Status = ExtPassThru->GetTargetLun (ExtPassThru, RemainingDevicePath, &TargetId, &Lun);
225 &gEfiExtScsiPassThruProtocolGuid,
226 This->DriverBindingHandle,
229 if (!EFI_ERROR (Status)) {
240 Status =
gBS->OpenProtocol (
242 &gEfiScsiPassThruProtocolGuid,
244 This->DriverBindingHandle,
246 EFI_OPEN_PROTOCOL_BY_DRIVER
249 if (Status == EFI_ALREADY_STARTED) {
253 if (EFI_ERROR (Status)) {
261 Status = PassThru->GetTargetLun (PassThru, RemainingDevicePath, &ScsiTargetId.ScsiId.Scsi, &Lun);
266 &gEfiScsiPassThruProtocolGuid,
267 This->DriverBindingHandle,
302 BOOLEAN ScanOtherPuns;
303 BOOLEAN FromFirstTarget;
304 BOOLEAN ExtScsiSupport;
316 ScanOtherPuns =
TRUE;
317 FromFirstTarget =
FALSE;
318 ExtScsiSupport =
FALSE;
321 TargetId = &ScsiTargetId.ScsiId.ExtScsi[0];
322 SetMem (TargetId, TARGET_MAX_BYTES, 0xFF);
324 DevicePathStatus =
gBS->OpenProtocol (
326 &gEfiDevicePathProtocolGuid,
327 (VOID **)&ParentDevicePath,
328 This->DriverBindingHandle,
330 EFI_OPEN_PROTOCOL_BY_DRIVER
332 if (EFI_ERROR (DevicePathStatus) && (DevicePathStatus != EFI_ALREADY_STARTED)) {
333 return DevicePathStatus;
350 Status =
gBS->OpenProtocol (
352 &gEfiExtScsiPassThruProtocolGuid,
353 (VOID **)&ExtScsiInterface,
354 This->DriverBindingHandle,
356 EFI_OPEN_PROTOCOL_BY_DRIVER
361 if (EFI_ERROR (Status) && (Status != EFI_ALREADY_STARTED)) {
362 Status =
gBS->OpenProtocol (
364 &gEfiScsiPassThruProtocolGuid,
365 (VOID **)&ScsiInterface,
366 This->DriverBindingHandle,
368 EFI_OPEN_PROTOCOL_BY_DRIVER
373 if (EFI_ERROR (Status) && (Status != EFI_ALREADY_STARTED)) {
374 if (!EFI_ERROR (DevicePathStatus)) {
377 &gEfiDevicePathProtocolGuid,
378 This->DriverBindingHandle,
391 ExtScsiSupport =
TRUE;
392 PassThruStatus =
gBS->OpenProtocol (
394 &gEfiScsiPassThruProtocolGuid,
395 (VOID **)&ScsiInterface,
396 This->DriverBindingHandle,
398 EFI_OPEN_PROTOCOL_BY_DRIVER
402 if (Status != EFI_ALREADY_STARTED) {
409 if (ScsiBusDev ==
NULL) {
410 Status = EFI_OUT_OF_RESOURCES;
414 ScsiBusDev->Signature = SCSI_BUS_DEVICE_SIGNATURE;
415 ScsiBusDev->ExtScsiSupport = ExtScsiSupport;
416 ScsiBusDev->DevicePath = ParentDevicePath;
417 if (ScsiBusDev->ExtScsiSupport) {
418 ScsiBusDev->ExtScsiInterface = ExtScsiInterface;
420 ScsiBusDev->ScsiInterface = ScsiInterface;
428 Status =
gBS->InstallProtocolInterface (
432 &ScsiBusDev->BusIdentify
434 if (EFI_ERROR (Status)) {
442 Status =
gBS->OpenProtocol (
445 (VOID **)&BusIdentify,
446 This->DriverBindingHandle,
448 EFI_OPEN_PROTOCOL_GET_PROTOCOL
451 if (EFI_ERROR (Status)) {
455 ScsiBusDev = SCSI_BUS_CONTROLLER_DEVICE_FROM_THIS (BusIdentify);
463 (EFI_IO_BUS_SCSI | EFI_IOB_PC_DETECT),
468 if (RemainingDevicePath ==
NULL) {
473 FromFirstTarget =
TRUE;
479 if (ScsiBusDev->ExtScsiSupport) {
480 Status = ScsiBusDev->ExtScsiInterface->GetTargetLun (ScsiBusDev->ExtScsiInterface, RemainingDevicePath, &TargetId, &Lun);
482 Status = ScsiBusDev->ScsiInterface->GetTargetLun (ScsiBusDev->ScsiInterface, RemainingDevicePath, &ScsiTargetId.ScsiId.Scsi, &Lun);
485 if (EFI_ERROR (Status)) {
493 ScanOtherPuns =
FALSE;
496 while (ScanOtherPuns) {
497 if (FromFirstTarget) {
502 if (ScsiBusDev->ExtScsiSupport) {
503 Status = ScsiBusDev->ExtScsiInterface->GetNextTargetLun (ScsiBusDev->ExtScsiInterface, &TargetId, &Lun);
505 Status = ScsiBusDev->ScsiInterface->GetNextDevice (ScsiBusDev->ScsiInterface, &ScsiTargetId.ScsiId.Scsi, &Lun);
508 if (EFI_ERROR (Status)) {
515 ScanOtherPuns =
FALSE;
521 if (ScsiBusDev->ExtScsiSupport) {
522 if ((ScsiTargetId.ScsiId.Scsi) == ScsiBusDev->ExtScsiInterface->
Mode->
AdapterId) {
526 if ((ScsiTargetId.ScsiId.Scsi) == ScsiBusDev->ScsiInterface->
Mode->
AdapterId) {
536 if (Status == EFI_OUT_OF_RESOURCES) {
545 if (ScsiBusDev !=
NULL) {
549 if (ExtScsiSupport) {
552 &gEfiExtScsiPassThruProtocolGuid,
553 This->DriverBindingHandle,
556 if (!EFI_ERROR (PassThruStatus)) {
559 &gEfiScsiPassThruProtocolGuid,
560 This->DriverBindingHandle,
567 &gEfiScsiPassThruProtocolGuid,
568 This->DriverBindingHandle,
605 BOOLEAN AllChildrenStopped;
613 if (NumberOfChildren == 0) {
617 Status =
gBS->OpenProtocol (
620 (VOID **)&Scsidentifier,
621 This->DriverBindingHandle,
623 EFI_OPEN_PROTOCOL_GET_PROTOCOL
626 if (EFI_ERROR (Status)) {
627 return EFI_DEVICE_ERROR;
630 ScsiBusDev = SCSI_BUS_CONTROLLER_DEVICE_FROM_THIS (Scsidentifier);
635 gBS->UninstallProtocolInterface (
638 &ScsiBusDev->BusIdentify
644 if (ScsiBusDev->ExtScsiSupport) {
650 &gEfiExtScsiPassThruProtocolGuid,
651 This->DriverBindingHandle,
661 &gEfiScsiPassThruProtocolGuid,
662 This->DriverBindingHandle,
668 &gEfiScsiPassThruProtocolGuid,
669 This->DriverBindingHandle,
676 &gEfiDevicePathProtocolGuid,
677 This->DriverBindingHandle,
684 AllChildrenStopped =
TRUE;
686 for (Index = 0; Index < NumberOfChildren; Index++) {
687 Status =
gBS->OpenProtocol (
688 ChildHandleBuffer[Index],
689 &gEfiScsiIoProtocolGuid,
691 This->DriverBindingHandle,
693 EFI_OPEN_PROTOCOL_GET_PROTOCOL
695 if (EFI_ERROR (Status)) {
696 AllChildrenStopped =
FALSE;
700 ScsiIoDevice = SCSI_IO_DEV_FROM_THIS (ScsiIo);
704 if (ScsiIoDevice->ExtScsiSupport) {
705 Status =
gBS->CloseProtocol (
707 &gEfiExtScsiPassThruProtocolGuid,
708 This->DriverBindingHandle,
709 ChildHandleBuffer[Index]
712 Status =
gBS->CloseProtocol (
714 &gEfiScsiPassThruProtocolGuid,
715 This->DriverBindingHandle,
716 ChildHandleBuffer[Index]
720 Status =
gBS->UninstallMultipleProtocolInterfaces (
721 ChildHandleBuffer[Index],
722 &gEfiDevicePathProtocolGuid,
723 ScsiIoDevice->DevicePath,
724 &gEfiScsiIoProtocolGuid,
725 &ScsiIoDevice->ScsiIo,
728 if (EFI_ERROR (Status)) {
729 AllChildrenStopped =
FALSE;
730 if (ScsiIoDevice->ExtScsiSupport) {
733 &gEfiExtScsiPassThruProtocolGuid,
735 This->DriverBindingHandle,
736 ChildHandleBuffer[Index],
737 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
742 &gEfiScsiPassThruProtocolGuid,
744 This->DriverBindingHandle,
745 ChildHandleBuffer[Index],
746 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
754 if (!AllChildrenStopped) {
755 return EFI_DEVICE_ERROR;
776 OUT UINT8 *DeviceType
781 if (DeviceType ==
NULL) {
782 return EFI_INVALID_PARAMETER;
785 ScsiIoDevice = SCSI_IO_DEV_FROM_THIS (This);
786 *DeviceType = ScsiIoDevice->ScsiDeviceType;
807 IN OUT UINT8 **Target,
813 if ((Target ==
NULL) || (Lun ==
NULL)) {
814 return EFI_INVALID_PARAMETER;
817 ScsiIoDevice = SCSI_IO_DEV_FROM_THIS (This);
819 CopyMem (*Target, &ScsiIoDevice->Pun, TARGET_MAX_BYTES);
821 *Lun = ScsiIoDevice->Lun;
846 ScsiIoDevice = SCSI_IO_DEV_FROM_THIS (This);
853 (EFI_IO_BUS_ATA_ATAPI | EFI_IOB_PC_RESET),
854 ScsiIoDevice->ScsiBusDeviceData->DevicePath
857 if (ScsiIoDevice->ExtScsiSupport) {
858 return ScsiIoDevice->ExtScsiPassThru->ResetChannel (ScsiIoDevice->ExtScsiPassThru);
860 return ScsiIoDevice->ScsiPassThru->ResetChannel (ScsiIoDevice->ScsiPassThru);
882 UINT8 Target[TARGET_MAX_BYTES];
884 ScsiIoDevice = SCSI_IO_DEV_FROM_THIS (This);
891 (EFI_IO_BUS_ATA_ATAPI | EFI_IOB_PC_RESET),
892 ScsiIoDevice->ScsiBusDeviceData->DevicePath
895 CopyMem (Target, &ScsiIoDevice->Pun, TARGET_MAX_BYTES);
897 if (ScsiIoDevice->ExtScsiSupport) {
898 return ScsiIoDevice->ExtScsiPassThru->ResetTargetLun (
899 ScsiIoDevice->ExtScsiPassThru,
904 return ScsiIoDevice->ScsiPassThru->ResetTarget (
905 ScsiIoDevice->ScsiPassThru,
906 ScsiIoDevice->Pun.ScsiId.Scsi,
969 UINT8 Target[TARGET_MAX_BYTES];
976 if (Packet ==
NULL) {
977 return EFI_INVALID_PARAMETER;
980 ScsiIoDevice = SCSI_IO_DEV_FROM_THIS (This);
981 CopyMem (Target, &ScsiIoDevice->Pun, TARGET_MAX_BYTES);
983 if (ScsiIoDevice->ExtScsiSupport) {
986 if (((ScsiIoDevice->ExtScsiPassThru->
Mode->
Attributes & EFI_SCSI_PASS_THRU_ATTRIBUTES_NONBLOCKIO) != 0) && (Event !=
NULL)) {
987 Status = ScsiIoDevice->ExtScsiPassThru->PassThru (
988 ScsiIoDevice->ExtScsiPassThru,
999 Status = ScsiIoDevice->ExtScsiPassThru->PassThru (
1000 ScsiIoDevice->ExtScsiPassThru,
1006 if ((!EFI_ERROR (Status)) && (Event !=
NULL)) {
1011 gBS->SignalEvent (Event);
1017 if (mWorkingBuffer ==
NULL) {
1018 return EFI_DEVICE_ERROR;
1025 if (EFI_ERROR (Status)) {
1030 if (((ScsiIoDevice->ScsiPassThru->
Mode->
Attributes & EFI_SCSI_PASS_THRU_ATTRIBUTES_NONBLOCKIO) != 0) && (Event !=
NULL)) {
1031 EventData.Data1 = (VOID *)Packet;
1032 EventData.Data2 = Event;
1036 Status =
gBS->CreateEvent (
1043 if (EFI_ERROR (Status)) {
1048 Status = ScsiIoDevice->ScsiPassThru->PassThru (
1049 ScsiIoDevice->ScsiPassThru,
1050 ScsiIoDevice->Pun.ScsiId.Scsi,
1056 if (EFI_ERROR (Status)) {
1058 gBS->CloseEvent (PacketEvent);
1066 Status = ScsiIoDevice->ScsiPassThru->PassThru (
1067 ScsiIoDevice->ScsiPassThru,
1068 ScsiIoDevice->Pun.ScsiId.Scsi,
1073 if (EFI_ERROR (Status)) {
1088 if (Event !=
NULL) {
1089 gBS->SignalEvent (Event);
1130 RemainingDevicePath =
NULL;
1131 ScsiDevicePath =
NULL;
1132 ScsiIoDevice =
NULL;
1137 if (ScsiBusDev->ExtScsiSupport) {
1138 Status = ScsiBusDev->ExtScsiInterface->BuildDevicePath (
1139 ScsiBusDev->ExtScsiInterface,
1140 &TargetId->ScsiId.ExtScsi[0],
1145 Status = ScsiBusDev->ScsiInterface->BuildDevicePath (
1146 ScsiBusDev->ScsiInterface,
1147 TargetId->ScsiId.Scsi,
1153 if (EFI_ERROR (Status)) {
1158 ScsiBusDev->DevicePath,
1162 if (DevicePath ==
NULL) {
1163 Status = EFI_OUT_OF_RESOURCES;
1167 DeviceHandle =
NULL;
1168 RemainingDevicePath = DevicePath;
1169 Status =
gBS->LocateDevicePath (&gEfiDevicePathProtocolGuid, &RemainingDevicePath, &DeviceHandle);
1170 if (!EFI_ERROR (Status) && (DeviceHandle !=
NULL) &&
IsDevicePathEnd (RemainingDevicePath)) {
1174 Status = EFI_ALREADY_STARTED;
1179 if (ScsiIoDevice ==
NULL) {
1180 Status = EFI_OUT_OF_RESOURCES;
1184 ScsiIoDevice->Signature = SCSI_IO_DEV_SIGNATURE;
1185 ScsiIoDevice->ScsiBusDeviceData = ScsiBusDev;
1186 CopyMem (&ScsiIoDevice->Pun, TargetId, TARGET_MAX_BYTES);
1187 ScsiIoDevice->Lun = Lun;
1189 if (ScsiBusDev->ExtScsiSupport) {
1190 ScsiIoDevice->ExtScsiPassThru = ScsiBusDev->ExtScsiInterface;
1191 ScsiIoDevice->ExtScsiSupport =
TRUE;
1194 ScsiIoDevice->ScsiPassThru = ScsiBusDev->ScsiInterface;
1195 ScsiIoDevice->ExtScsiSupport =
FALSE;
1210 (EFI_IO_BUS_SCSI | EFI_IOB_PC_ENABLE),
1211 ScsiBusDev->DevicePath
1215 if (EFI_ERROR (Status)) {
1219 ScsiIoDevice->DevicePath = DevicePath;
1221 Status =
gBS->InstallMultipleProtocolInterfaces (
1222 &ScsiIoDevice->Handle,
1223 &gEfiDevicePathProtocolGuid,
1224 ScsiIoDevice->DevicePath,
1225 &gEfiScsiIoProtocolGuid,
1226 &ScsiIoDevice->ScsiIo,
1229 if (EFI_ERROR (Status)) {
1232 if (ScsiBusDev->ExtScsiSupport) {
1235 &gEfiExtScsiPassThruProtocolGuid,
1236 (VOID **)&(ScsiBusDev->ExtScsiInterface),
1237 This->DriverBindingHandle,
1238 ScsiIoDevice->Handle,
1239 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
1244 &gEfiScsiPassThruProtocolGuid,
1245 (VOID **)&(ScsiBusDev->ScsiInterface),
1246 This->DriverBindingHandle,
1247 ScsiIoDevice->Handle,
1248 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
1264 if (DevicePath !=
NULL) {
1268 if (ScsiIoDevice !=
NULL) {
1291 UINT32 InquiryDataLength;
1292 UINT8 SenseDataLength;
1293 UINT8 HostAdapterStatus;
1300 HostAdapterStatus = 0;
1305 if (InquiryData ==
NULL) {
1306 Status = EFI_OUT_OF_RESOURCES;
1314 if (SenseData ==
NULL) {
1315 Status = EFI_OUT_OF_RESOURCES;
1324 ZeroMem (InquiryData, InquiryDataLength);
1325 ZeroMem (SenseData, SenseDataLength);
1328 for (Index = 0; Index < MaxRetry; Index++) {
1330 &ScsiIoDevice->ScsiIo,
1336 (VOID *)InquiryData,
1340 if (!EFI_ERROR (Status)) {
1341 if ((HostAdapterStatus == EFI_SCSI_IO_STATUS_HOST_ADAPTER_OK) &&
1343 (SenseData->Error_Code == 0x70) &&
1344 (SenseData->Sense_Key == EFI_SCSI_SK_ILLEGAL_REQUEST))
1346 Status = EFI_NOT_FOUND;
1353 if ((Status == EFI_BAD_BUFFER_SIZE) ||
1354 (Status == EFI_INVALID_PARAMETER) ||
1355 (Status == EFI_UNSUPPORTED))
1357 Status = EFI_NOT_FOUND;
1362 if (Index == MaxRetry) {
1363 Status = EFI_NOT_FOUND;
1370 if (InquiryData->Peripheral_Qualifier != 0) {
1371 Status = EFI_NOT_FOUND;
1378 Status = EFI_NOT_FOUND;
1385 ScsiIoDevice->ScsiDeviceType = InquiryData->Peripheral_Type;
1386 ScsiIoDevice->RemovableDevice = InquiryData->Rmb;
1387 if (InquiryData->Version == 0) {
1388 ScsiIoDevice->ScsiVersion = 0;
1393 ScsiIoDevice->ScsiVersion = (UINT8)(InquiryData->Version & 0x07);
1422 if (Packet->DataDirection == EFI_SCSI_IO_DATA_DIRECTION_BIDIRECTIONAL) {
1423 return EFI_UNSUPPORTED;
1428 CommandPacket->Timeout = Packet->Timeout;
1429 CommandPacket->Cdb = Packet->Cdb;
1430 CommandPacket->CdbLength = Packet->CdbLength;
1431 CommandPacket->DataDirection = Packet->DataDirection;
1432 CommandPacket->HostAdapterStatus = Packet->HostAdapterStatus;
1433 CommandPacket->TargetStatus = Packet->TargetStatus;
1434 CommandPacket->SenseData = Packet->SenseData;
1435 CommandPacket->SenseDataLength = Packet->SenseDataLength;
1437 if (Packet->DataDirection == EFI_SCSI_IO_DATA_DIRECTION_READ) {
1438 CommandPacket->DataBuffer = Packet->InDataBuffer;
1439 CommandPacket->TransferLength = Packet->InTransferLength;
1440 }
else if (Packet->DataDirection == EFI_SCSI_IO_DATA_DIRECTION_WRITE) {
1441 CommandPacket->DataBuffer = Packet->OutDataBuffer;
1442 CommandPacket->TransferLength = Packet->OutTransferLength;
1462 Packet->Timeout = ScsiPacket->Timeout;
1463 Packet->Cdb = ScsiPacket->Cdb;
1464 Packet->CdbLength = ScsiPacket->CdbLength;
1465 Packet->DataDirection = ScsiPacket->DataDirection;
1466 Packet->HostAdapterStatus = ScsiPacket->HostAdapterStatus;
1467 Packet->TargetStatus = ScsiPacket->TargetStatus;
1468 Packet->SenseData = ScsiPacket->SenseData;
1469 Packet->SenseDataLength = ScsiPacket->SenseDataLength;
1471 if (ScsiPacket->DataDirection == EFI_SCSI_IO_DATA_DIRECTION_READ) {
1472 Packet->InDataBuffer = ScsiPacket->DataBuffer;
1473 Packet->InTransferLength = ScsiPacket->TransferLength;
1474 }
else if (Packet->DataDirection == EFI_SCSI_IO_DATA_DIRECTION_WRITE) {
1475 Packet->OutDataBuffer = ScsiPacket->DataBuffer;
1476 Packet->OutTransferLength = ScsiPacket->TransferLength;
1515 gBS->FreePool (mWorkingBuffer);
1520 CallerEvent = PassData->Data2;
1521 gBS->CloseEvent (Event);
1522 gBS->SignalEvent (CallerEvent);
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI SetMem(OUT VOID *Buffer, IN UINTN Length, IN UINT8 Value)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI AppendDevicePathNode(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathNode OPTIONAL)
BOOLEAN EFIAPI IsDevicePathEnd(IN CONST VOID *Node)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID EFIAPI FreeAlignedPages(IN VOID *Buffer, IN UINTN Pages)
#define ASSERT_EFI_ERROR(StatusParameter)
#define REPORT_STATUS_CODE_WITH_DEVICE_PATH(Type, Value, DevicePathParameter)
#define EFI_PROGRESS_CODE
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
VOID *EFIAPI AllocateAlignedPages(IN UINTN Pages, IN UINTN Alignment)
#define EFI_SCSI_TYPE_RESERVED_HIGH
Reserved (high)
#define EFI_SCSI_TYPE_RESERVED_LOW
Reserved (low)
EFI_STATUS EFIAPI ScsiResetBus(IN EFI_SCSI_IO_PROTOCOL *This)
EFI_STATUS EFIAPI SCSIBusDriverBindingStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI ScsiioToPassThruPacket(IN EFI_SCSI_IO_SCSI_REQUEST_PACKET *Packet, OUT EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *CommandPacket)
EFI_STATUS EFIAPI ScsiGetDeviceLocation(IN EFI_SCSI_IO_PROTOCOL *This, IN OUT UINT8 **Target, OUT UINT64 *Lun)
EFI_STATUS EFIAPI SCSIBusDriverBindingStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
VOID FreeAlignedBuffer(IN VOID *Buffer, IN UINTN BufferSize)
EFI_STATUS EFIAPI SCSIBusDriverBindingSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI InitializeScsiBus(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS EFIAPI PassThruToScsiioPacket(IN EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *ScsiPacket, OUT EFI_SCSI_IO_SCSI_REQUEST_PACKET *Packet)
EFI_STATUS DiscoverScsiDevice(IN OUT SCSI_IO_DEV *ScsiIoDevice)
EFI_STATUS EFIAPI ScsiScanCreateDevice(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN SCSI_TARGET_ID *TargetId, IN UINT64 Lun, IN OUT SCSI_BUS_DEVICE *ScsiBusDev)
EFI_STATUS EFIAPI ScsiResetDevice(IN EFI_SCSI_IO_PROTOCOL *This)
EFI_STATUS EFIAPI ScsiGetDeviceType(IN EFI_SCSI_IO_PROTOCOL *This, OUT UINT8 *DeviceType)
EFI_STATUS EFIAPI ScsiExecuteSCSICommand(IN EFI_SCSI_IO_PROTOCOL *This, IN OUT EFI_SCSI_IO_SCSI_REQUEST_PACKET *Packet, IN EFI_EVENT Event OPTIONAL)
VOID EFIAPI NotifyFunction(IN EFI_EVENT Event, IN VOID *Context)
VOID * AllocateAlignedBuffer(IN SCSI_IO_DEV *ScsiIoDevice, IN UINTN BufferSize)
#define EFI_SCSI_IO_STATUS_TARGET_CHECK_CONDITION
check condition
#define EFI_SIZE_TO_PAGES(Size)
EFI_STATUS EFIAPI EfiLibInstallDriverBindingComponentName2(IN CONST EFI_HANDLE ImageHandle, IN CONST EFI_SYSTEM_TABLE *SystemTable, IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, IN EFI_HANDLE DriverBindingHandle, IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL)
EFI_STATUS EFIAPI ScsiInquiryCommand(IN EFI_SCSI_IO_PROTOCOL *ScsiIo, IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, OUT UINT8 *HostAdapterStatus, OUT UINT8 *TargetStatus, IN OUT VOID *InquiryDataBuffer OPTIONAL, IN OUT UINT32 *InquiryDataLength, IN BOOLEAN EnableVitalProductData)
EFI_EXT_SCSI_PASS_THRU_MODE * Mode
EFI_SCSI_PASS_THRU_MODE * Mode