From c974257821208fc6191779d1ddea918499f165b8 Mon Sep 17 00:00:00 2001 From: Liming Gao Date: Mon, 1 Nov 2021 17:44:22 +0800 Subject: [PATCH] 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 Cc: Hao A Wu Cc: Ray Ni Reviewed-by: Hao A Wu --- .../Bus/Ata/AtaAtapiPassThru/AhciMode.c | 19 +++++++++---------- 1 file 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)); }