* [PATCH] MdeModulePkg AtaAtapiPassThru: Always do S.M.A.R.T. check if device support
@ 2021-11-01 9:45 gaoliming
2021-11-02 3:17 ` [edk2-devel] " Wu, Hao A
0 siblings, 1 reply; 3+ messages in thread
From: gaoliming @ 2021-11-01 9:45 UTC (permalink / raw)
To: devel; +Cc: Hao A Wu, Ray Ni
If S.M.A.R.T. has been enabled, 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>
---
.../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..a2831de65c 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));
}
--
2.27.0.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [edk2-devel] [PATCH] MdeModulePkg AtaAtapiPassThru: Always do S.M.A.R.T. check if device support
2021-11-01 9:45 [PATCH] MdeModulePkg AtaAtapiPassThru: Always do S.M.A.R.T. check if device support gaoliming
@ 2021-11-02 3:17 ` Wu, Hao A
2021-11-04 5:52 ` 回复: " gaoliming
0 siblings, 1 reply; 3+ messages in thread
From: Wu, Hao A @ 2021-11-02 3:17 UTC (permalink / raw)
To: devel@edk2.groups.io, gaoliming@byosoft.com.cn; +Cc: Ni, Ray
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> gaoliming
> Sent: Monday, November 1, 2021 5:46 PM
> To: devel@edk2.groups.io
> Cc: Wu, Hao A <hao.a.wu@intel.com>; Ni, Ray <ray.ni@intel.com>
> Subject: [edk2-devel] [PATCH] MdeModulePkg AtaAtapiPassThru: Always do
> S.M.A.R.T. check if device support
>
> If S.M.A.R.T. has been enabled, it can be checked.
A minor comment. I think the log message can be refined a little bit to:
If S.M.A.R.T. is supported, it can be checked.
The code change looks good to me:
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Best Regards,
Hao Wu
>
> 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>
> ---
> .../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..a2831de65c 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));
> }
> --
> 2.27.0.windows.1
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* 回复: [edk2-devel] [PATCH] MdeModulePkg AtaAtapiPassThru: Always do S.M.A.R.T. check if device support
2021-11-02 3:17 ` [edk2-devel] " Wu, Hao A
@ 2021-11-04 5:52 ` gaoliming
0 siblings, 0 replies; 3+ messages in thread
From: gaoliming @ 2021-11-04 5:52 UTC (permalink / raw)
To: 'Wu, Hao A', devel; +Cc: 'Ni, Ray'
Hao:
Thanks for your comment. I will update the commit log.
Thanks
Liming
> -----邮件原件-----
> 发件人: Wu, Hao A <hao.a.wu@intel.com>
> 发送时间: 2021年11月2日 11:17
> 收件人: devel@edk2.groups.io; gaoliming@byosoft.com.cn
> 抄送: Ni, Ray <ray.ni@intel.com>
> 主题: RE: [edk2-devel] [PATCH] MdeModulePkg AtaAtapiPassThru: Always do
> S.M.A.R.T. check if device support
>
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> > gaoliming
> > Sent: Monday, November 1, 2021 5:46 PM
> > To: devel@edk2.groups.io
> > Cc: Wu, Hao A <hao.a.wu@intel.com>; Ni, Ray <ray.ni@intel.com>
> > Subject: [edk2-devel] [PATCH] MdeModulePkg AtaAtapiPassThru: Always do
> > S.M.A.R.T. check if device support
> >
> > If S.M.A.R.T. has been enabled, it can be checked.
>
>
> A minor comment. I think the log message can be refined a little bit to:
> If S.M.A.R.T. is supported, it can be checked.
>
> The code change looks good to me:
> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
>
> Best Regards,
> Hao Wu
>
>
> >
> > 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>
> > ---
> > .../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..a2831de65c 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));
> > }
> > --
> > 2.27.0.windows.1
> >
> >
> >
> >
> >
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-04 5:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-01 9:45 [PATCH] MdeModulePkg AtaAtapiPassThru: Always do S.M.A.R.T. check if device support gaoliming
2021-11-02 3:17 ` [edk2-devel] " Wu, Hao A
2021-11-04 5:52 ` 回复: " gaoliming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox