86 return EFI_INVALID_PARAMETER;
89 if ((Packet ==
NULL) || (Packet->Cdb ==
NULL)) {
90 return EFI_INVALID_PARAMETER;
94 if ((Status !=
EFI_SUCCESS) && (Status != EFI_NOT_READY)) {
98 Private = ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU (This);
100 return EFI_DEVICE_ERROR;
142 IN OUT UINT8 **Target,
148 UINT8 TargetId[TARGET_MAX_BYTES];
150 Private = ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU (This);
151 ConfigNvData = &Private->Session->ConfigData->SessionConfigData;
153 if (((*Target)[0] == 0) && (
CompareMem (Lun, ConfigNvData->BootLun, sizeof (UINT64)) == 0)) {
157 return EFI_NOT_FOUND;
160 SetMem (TargetId, TARGET_MAX_BYTES, 0xFF);
161 if (
CompareMem (*Target, TargetId, TARGET_MAX_BYTES) == 0) {
163 CopyMem (Lun, ConfigNvData->BootLun, sizeof (UINT64));
168 return EFI_INVALID_PARAMETER;
211 UINTN DevPathNodeLen;
213 if (DevicePath ==
NULL) {
214 return EFI_INVALID_PARAMETER;
217 if (Target[0] != 0) {
218 return EFI_NOT_FOUND;
221 Private = ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU (This);
222 Session = Private->Session;
223 ConfigNvData = &Session->ConfigData->SessionConfigData;
224 AuthConfig = Session->AuthData.CHAP.AuthConfig;
226 if (
CompareMem (&Lun, ConfigNvData->BootLun, sizeof (UINT64)) != 0) {
227 return EFI_NOT_FOUND;
233 return EFI_OUT_OF_RESOURCES;
247 switch (Session->AuthType) {
248 case ISCSI_AUTH_TYPE_NONE:
252 case ISCSI_AUTH_TYPE_CHAP:
256 if (AuthConfig->CHAPType == ISCSI_CHAP_UNI) {
266 CopyMem (&Node->Iscsi.
Lun, ConfigNvData->BootLun, sizeof (UINT64));
308 if ((DevicePath ==
NULL) || (Target ==
NULL) || (Lun ==
NULL)) {
309 return EFI_INVALID_PARAMETER;
317 return EFI_UNSUPPORTED;
320 Private = ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU (This);
321 ConfigNvData = &Private->Session->ConfigData->SessionConfigData;
323 SetMem (*Target, TARGET_MAX_BYTES, 0xFF);
327 return EFI_UNSUPPORTED;
330 CopyMem (Lun, ConfigNvData->BootLun, sizeof (UINT64));
350 return EFI_UNSUPPORTED;
371 return EFI_UNSUPPORTED;
399 IN OUT UINT8 **Target
402 UINT8 TargetId[TARGET_MAX_BYTES];
404 SetMem (TargetId, TARGET_MAX_BYTES, 0xFF);
406 if (
CompareMem (*Target, TargetId, TARGET_MAX_BYTES) == 0) {
409 }
else if ((*Target)[0] == 0) {
410 return EFI_NOT_FOUND;
412 return EFI_INVALID_PARAMETER;
UINTN EFIAPI AsciiStrLen(IN CONST CHAR8 *String)
INTN EFIAPI AsciiStrCmp(IN CONST CHAR8 *FirstString, IN CONST CHAR8 *SecondString)
RETURN_STATUS EFIAPI AsciiStrCpyS(OUT CHAR8 *Destination, IN UINTN DestMax, IN CONST CHAR8 *Source)
INTN EFIAPI CompareMem(IN CONST VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
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)
#define MESSAGING_DEVICE_PATH
UINT16 EFIAPI SetDevicePathNodeLength(IN OUT VOID *Node, IN UINTN Length)
UINTN EFIAPI DevicePathNodeLength(IN CONST VOID *Node)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
EFI_STATUS EFIAPI IScsiExtScsiPassThruResetTargetLun(IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This, IN UINT8 *Target, IN UINT64 Lun)
EFI_STATUS EFIAPI IScsiExtScsiPassThruBuildDevicePath(IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This, IN UINT8 *Target, IN UINT64 Lun, IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath)
EFI_STATUS EFIAPI IScsiExtScsiPassThruGetNextTargetLun(IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This, IN OUT UINT8 **Target, IN OUT UINT64 *Lun)
EFI_STATUS EFIAPI IScsiExtScsiPassThruGetNextTarget(IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This, IN OUT UINT8 **Target)
EFI_STATUS EFIAPI IScsiExtScsiPassThruGetTargetLun(IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, OUT UINT8 **Target, OUT UINT64 *Lun)
EFI_STATUS EFIAPI IScsiExtScsiPassThruResetChannel(IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This)
EFI_STATUS EFIAPI IScsiExtScsiPassThruFunction(IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This, IN UINT8 *Target, IN UINT64 Lun, IN OUT EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet, IN EFI_EVENT Event OPTIONAL)
EFI_STATUS IScsiSessionReinstatement(IN ISCSI_SESSION *Session)
EFI_STATUS IScsiExecuteScsiCommand(IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *PassThru, IN UINT8 *Target, IN UINT64 Lun, IN OUT EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet)
UINT16 TargetPortalGroupTag