Add missing status code in several modules.
Signed-off-by: Li Elvin <elvin.li@intel.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com> Reviewed-by: Ni Ruiyu <ruiyu.ni@intel.com> Reviewed-by: Gao Liming <liming.gao@intel.com> Reviewed-by: Tian Feng <feng.tian@intel.com> Reviewed-by: Fan Jeff <jeff.fan@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13890 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
SCSI Bus driver that layers on every SCSI Pass Thru and
|
||||
Extended SCSI Pass Thru protocol in the system.
|
||||
|
||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -341,6 +341,15 @@ SCSIBusDriverBindingStart (
|
||||
return DevicePathStatus;
|
||||
}
|
||||
|
||||
//
|
||||
// Report Status Code to indicate SCSI bus starts
|
||||
//
|
||||
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
|
||||
EFI_PROGRESS_CODE,
|
||||
(EFI_IO_BUS_SCSI | EFI_IOB_PC_INIT),
|
||||
ParentDevicePath
|
||||
);
|
||||
|
||||
//
|
||||
// To keep backward compatibility, UEFI ExtPassThru Protocol is supported as well as
|
||||
// EFI PassThru Protocol. From priority perspective, ExtPassThru Protocol is firstly
|
||||
@@ -451,6 +460,15 @@ SCSIBusDriverBindingStart (
|
||||
ScsiBusDev = SCSI_BUS_CONTROLLER_DEVICE_FROM_THIS (BusIdentify);
|
||||
}
|
||||
|
||||
//
|
||||
// Report Status Code to indicate detecting devices on bus
|
||||
//
|
||||
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
|
||||
EFI_PROGRESS_CODE,
|
||||
(EFI_IO_BUS_SCSI | EFI_IOB_PC_DETECT),
|
||||
ParentDevicePath
|
||||
);
|
||||
|
||||
Lun = 0;
|
||||
if (RemainingDevicePath == NULL) {
|
||||
//
|
||||
@@ -828,6 +846,15 @@ ScsiResetBus (
|
||||
|
||||
ScsiIoDevice = SCSI_IO_DEV_FROM_THIS (This);
|
||||
|
||||
//
|
||||
// Report Status Code to indicate reset happens
|
||||
//
|
||||
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
|
||||
EFI_PROGRESS_CODE,
|
||||
(EFI_IO_BUS_ATA_ATAPI | EFI_IOB_PC_RESET),
|
||||
ScsiIoDevice->ScsiBusDeviceData->DevicePath
|
||||
);
|
||||
|
||||
if (ScsiIoDevice->ExtScsiSupport){
|
||||
return ScsiIoDevice->ExtScsiPassThru->ResetChannel (ScsiIoDevice->ExtScsiPassThru);
|
||||
} else {
|
||||
@@ -857,6 +884,16 @@ ScsiResetDevice (
|
||||
UINT8 Target[TARGET_MAX_BYTES];
|
||||
|
||||
ScsiIoDevice = SCSI_IO_DEV_FROM_THIS (This);
|
||||
|
||||
//
|
||||
// Report Status Code to indicate reset happens
|
||||
//
|
||||
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
|
||||
EFI_PROGRESS_CODE,
|
||||
(EFI_IO_BUS_ATA_ATAPI | EFI_IOB_PC_RESET),
|
||||
ScsiIoDevice->ScsiBusDeviceData->DevicePath
|
||||
);
|
||||
|
||||
CopyMem (Target,&ScsiIoDevice->Pun, TARGET_MAX_BYTES);
|
||||
|
||||
|
||||
@@ -1121,6 +1158,7 @@ ScsiScanCreateDevice (
|
||||
}
|
||||
|
||||
ScsiIoDevice->Signature = SCSI_IO_DEV_SIGNATURE;
|
||||
ScsiIoDevice->ScsiBusDeviceData = ScsiBusDev;
|
||||
CopyMem(&ScsiIoDevice->Pun, TargetId, TARGET_MAX_BYTES);
|
||||
ScsiIoDevice->Lun = Lun;
|
||||
|
||||
@@ -1141,6 +1179,15 @@ ScsiScanCreateDevice (
|
||||
ScsiIoDevice->ScsiIo.ResetDevice = ScsiResetDevice;
|
||||
ScsiIoDevice->ScsiIo.ExecuteScsiCommand = ScsiExecuteSCSICommand;
|
||||
|
||||
//
|
||||
// Report Status Code here since the new SCSI device will be discovered
|
||||
//
|
||||
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
|
||||
EFI_PROGRESS_CODE,
|
||||
(EFI_IO_BUS_SCSI | EFI_IOB_PC_ENABLE),
|
||||
ScsiBusDev->DevicePath
|
||||
);
|
||||
|
||||
if (!DiscoverScsiDevice (ScsiIoDevice)) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto ErrorExit;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Header file for SCSI Bus Driver.
|
||||
|
||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -33,6 +33,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include <Library/UefiScsiLib.h>
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
#include <Library/DevicePathLib.h>
|
||||
#include <Library/ReportStatusCodeLib.h>
|
||||
|
||||
#include <IndustryStandard/Scsi.h>
|
||||
|
||||
@@ -54,27 +55,10 @@ typedef struct {
|
||||
VOID *Data2;
|
||||
} SCSI_EVENT_DATA;
|
||||
|
||||
|
||||
typedef struct {
|
||||
UINT32 Signature;
|
||||
EFI_HANDLE Handle;
|
||||
EFI_SCSI_IO_PROTOCOL ScsiIo;
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||
BOOLEAN ExtScsiSupport;
|
||||
EFI_SCSI_PASS_THRU_PROTOCOL *ScsiPassThru;
|
||||
EFI_EXT_SCSI_PASS_THRU_PROTOCOL *ExtScsiPassThru;
|
||||
SCSI_TARGET_ID Pun;
|
||||
UINT64 Lun;
|
||||
UINT8 ScsiDeviceType;
|
||||
UINT8 ScsiVersion;
|
||||
BOOLEAN RemovableDevice;
|
||||
} SCSI_IO_DEV;
|
||||
|
||||
#define SCSI_IO_DEV_FROM_THIS(a) CR (a, SCSI_IO_DEV, ScsiIo, SCSI_IO_DEV_SIGNATURE)
|
||||
|
||||
//
|
||||
// SCSI Bus Controller device strcuture
|
||||
//
|
||||
#define SCSI_BUS_DEVICE_SIGNATURE SIGNATURE_32 ('s', 'c', 's', 'i')
|
||||
|
||||
//
|
||||
// The ScsiBusProtocol is just used to locate ScsiBusDev
|
||||
@@ -87,9 +71,6 @@ typedef struct _EFI_SCSI_BUS_PROTOCOL {
|
||||
UINT64 Reserved;
|
||||
} EFI_SCSI_BUS_PROTOCOL;
|
||||
|
||||
#define SCSI_BUS_DEVICE_SIGNATURE SIGNATURE_32 ('s', 'c', 's', 'i')
|
||||
|
||||
|
||||
typedef struct _SCSI_BUS_DEVICE {
|
||||
UINTN Signature;
|
||||
EFI_SCSI_BUS_PROTOCOL BusIdentify;
|
||||
@@ -101,6 +82,24 @@ typedef struct _SCSI_BUS_DEVICE {
|
||||
|
||||
#define SCSI_BUS_CONTROLLER_DEVICE_FROM_THIS(a) CR (a, SCSI_BUS_DEVICE, BusIdentify, SCSI_BUS_DEVICE_SIGNATURE)
|
||||
|
||||
typedef struct {
|
||||
UINT32 Signature;
|
||||
EFI_HANDLE Handle;
|
||||
EFI_SCSI_IO_PROTOCOL ScsiIo;
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||
BOOLEAN ExtScsiSupport;
|
||||
EFI_SCSI_PASS_THRU_PROTOCOL *ScsiPassThru;
|
||||
EFI_EXT_SCSI_PASS_THRU_PROTOCOL *ExtScsiPassThru;
|
||||
SCSI_BUS_DEVICE *ScsiBusDeviceData;
|
||||
SCSI_TARGET_ID Pun;
|
||||
UINT64 Lun;
|
||||
UINT8 ScsiDeviceType;
|
||||
UINT8 ScsiVersion;
|
||||
BOOLEAN RemovableDevice;
|
||||
} SCSI_IO_DEV;
|
||||
|
||||
#define SCSI_IO_DEV_FROM_THIS(a) CR (a, SCSI_IO_DEV, ScsiIo, SCSI_IO_DEV_SIGNATURE)
|
||||
|
||||
//
|
||||
// Global Variables
|
||||
//
|
||||
|
@@ -4,7 +4,7 @@
|
||||
# each of them. After this the driver installs the Device Path Protocol and SCSI I/O Protocol on
|
||||
# these handles.
|
||||
#
|
||||
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -55,6 +55,7 @@
|
||||
UefiDriverEntryPoint
|
||||
DebugLib
|
||||
MemoryAllocationLib
|
||||
ReportStatusCodeLib
|
||||
|
||||
|
||||
[Protocols]
|
||||
|
Reference in New Issue
Block a user