summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorLiming Gao <gaoliming@byosoft.com.cn>2021-11-01 17:44:22 +0800
committerLiming Gao <gaoliming@byosoft.com.cn>2021-11-09 15:00:52 +0800
commitc974257821208fc6191779d1ddea918499f165b8 (patch)
tree8558a7435365c275887f6da9347f5999158bce56 /MdeModulePkg
parentd6e6337cd6ee0b7f06578693ea0cef8e428b93f9 (diff)
downloadedk2-c974257821208fc6191779d1ddea918499f165b8.tar.gz
edk2-c974257821208fc6191779d1ddea918499f165b8.tar.bz2
edk2-c974257821208fc6191779d1ddea918499f165b8.zip
MdeModulePkg AtaAtapiPassThru: Always do S.M.A.R.T. check if device support
If S.M.A.R.T. is supported, it can be checked. Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
index 1053695b3b..7626bac38d 100644
--- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
+++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
@@ -1833,18 +1833,17 @@ AhciAtaSmartSupport (
ATA_ATAPI_TIMEOUT,
NULL
);
-
- if (!EFI_ERROR (Status)) {
- Status = AhciAtaSmartReturnStatusCheck (
- PciIo,
- AhciRegisters,
- (UINT8)Port,
- (UINT8)PortMultiplier,
- AtaStatusBlock
- );
- }
}
}
+
+ AhciAtaSmartReturnStatusCheck (
+ PciIo,
+ AhciRegisters,
+ (UINT8)Port,
+ (UINT8)PortMultiplier,
+ AtaStatusBlock
+ );
+
DEBUG ((EFI_D_INFO, "Enabled S.M.A.R.T feature at port [%d] PortMultiplier [%d]!\n",
Port, PortMultiplier));
}