summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
diff options
context:
space:
mode:
authorli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>2012-10-30 04:23:40 +0000
committerli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>2012-10-30 04:23:40 +0000
commit37623a5c029e5415fe24b86bf4f6481f8fdfad94 (patch)
tree925965b7341d07571b8bb22d51cacd39262ac0b7 /MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
parentcb38c322f037a9a5d2751a4c7e351b0ee7302e96 (diff)
downloadedk2-37623a5c029e5415fe24b86bf4f6481f8fdfad94.tar.gz
edk2-37623a5c029e5415fe24b86bf4f6481f8fdfad94.tar.bz2
edk2-37623a5c029e5415fe24b86bf4f6481f8fdfad94.zip
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
Diffstat (limited to 'MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c')
-rw-r--r--MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c49
1 files changed, 48 insertions, 1 deletions
diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
index 7387a44dbe..a0833cfaf4 100644
--- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
+++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
@@ -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
@@ -342,6 +342,15 @@ SCSIBusDriverBindingStart (
}
//
+ // 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
// tried to open on host controller handle. If fails, then PassThru Protocol is tried instead.
@@ -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;