From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-162.mimecast.com (us-smtp-delivery-162.mimecast.com [170.10.133.162]) by mx.groups.io with SMTP id smtpd.web08.3455.1666303506013194074 for ; Thu, 20 Oct 2022 15:05:07 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hp.com header.s=mimecast20180716 header.b=n+TGJgQC; spf=pass (domain: hp.com, ip: 170.10.133.162, mailfrom: anbazhagan@hp.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hp.com; s=mimecast20180716; t=1666303505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=XuntJLJn3DID6SlnRQfmpq1B8rLTEzq3Ss++q+oC0+E=; b=n+TGJgQC0IXXN4t5Sab6IoDh+weJ6yzmcP4Qb2WgTer1LzwiaTEdBriJXZ8qYDUOKF9a9/ LN+7ENle6wK9/HM0X85gSYnNpEuGnZXhdhozTQJhUBitYWNAFe+Pf4XVueXPBJdoOE9E2l PT2GAvdwzRoNBFcbjBLMiL7SnfZzjrg= Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2109.outbound.protection.outlook.com [104.47.70.109]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-564-sUlFI10eMpWHnTAWlFJB1g-1; Thu, 20 Oct 2022 18:05:03 -0400 X-MC-Unique: sUlFI10eMpWHnTAWlFJB1g-1 Received: from DM4PR84MB1520.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:8:4b::12) by MW5PR84MB1354.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:303:1c0::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.29; Thu, 20 Oct 2022 22:05:01 +0000 Received: from DM4PR84MB1520.NAMPRD84.PROD.OUTLOOK.COM ([fe80::c4d1:e1ce:c824:913d]) by DM4PR84MB1520.NAMPRD84.PROD.OUTLOOK.COM ([fe80::c4d1:e1ce:c824:913d%4]) with mapi id 15.20.5723.033; Thu, 20 Oct 2022 22:05:01 +0000 From: "Anbazhagan, Baraneedharan" To: "Wu, Hao A" , "Albecki, Mateusz" , "devel@edk2.groups.io" CC: "Ni, Ray" Subject: Re: [PATCH 1/1] MdeModulePkg/Ata: Fix command status reporting Thread-Topic: [PATCH 1/1] MdeModulePkg/Ata: Fix command status reporting Thread-Index: AQHY41tK+brt4oEUU0a6PDf+amZ7H64X1+Ow Date: Thu, 20 Oct 2022 22:05:01 +0000 Message-ID: References: <20221018155419.2808-1-mateusz.albecki@intel.com> <20221018155419.2808-2-mateusz.albecki@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR84MB1520:EE_|MW5PR84MB1354:EE_ x-ms-office365-filtering-correlation-id: ed391dbe-f740-4c24-43f8-08dab2e722bd x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0 x-microsoft-antispam-message-info: kKSyeBVdLSS37HUqG1llYj1IybM5NroeRyUNQScmSubUT3rGkNd2UdhWGO6gxsTCdi6bcwm0G5emffI0Czui2NDNcscUuQHI/pvopkqgdj5exT6FouMH/XveIzfO3Dil4tHJg5JG1l/jWId/w3L6fgbHXJSDPqHSRN4BCBBIcEi18C3TddA74bxkpHSy4Fzqzx3sbbBSNeXhxizfxJ6ivgvXs3MjM0jFxIvXNm1stXL7uPM5OPiTs19NF+aAYhxLDXgM8Zc5mbO8I1UR0zdHshuvZ4IBjW60VUeB+m6wbKyBa+umQS5APMQ5WfSuB2N3uowmwevlSoslsKBm5U/0Tv0370k7cCCj9Fa2XlXRvbrCjbKpFuxsuXRI38GnNjwESpjkgU7zn6v5qO+Y6Joap7i0oTQC4+Os8CuKZKrKD+XTOSyHxqKBgEmFlKj8kRiAigUm0LrElXEuHu9skPbzKhnvkn96kgJ7ox99pfVDMvCiyeuOyNPVd8XzEG7e7Lt//WBlFdehmsTSxMnZLeBOEqDUY4CclzAYg+0X9tHjfUJ4AuRP6QLnQOj2yczwO5Pua3RppyU81ZIfTSSNNvJrh5Tf0AKfhGag05YKDqhmBMOMpt2TuV3Dv/uD//KuUwkZu9uTovpWh1Ryfsc+ZMIIdMfasciGAdWmRlv/czEZnMtVmg09MesGYdZ6r3mQVwEGLbukWzFie19003gRd75y2hW3ql5KdhgL4BMV1sFgEvAq7VNJSbTWSLU4mYAUABxd3oXnnJYnyKCEYvEAoAhZq4D1ChiUpyPzAmrp5hADW7wbKV2eFOhVeJX/47QuC3nc4UZp/5NSo8HwTFXWQocFMA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR84MB1520.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230022)(4636009)(366004)(396003)(346002)(376002)(136003)(39860400002)(451199015)(71200400001)(33656002)(38100700002)(82960400001)(186003)(166002)(122000001)(966005)(38070700005)(478600001)(66946007)(8676002)(53546011)(76116006)(64756008)(83380400001)(7696005)(66446008)(110136005)(66476007)(5660300002)(66556008)(8936002)(9686003)(6506007)(4326008)(52536014)(86362001)(2906002)(316002)(41300700001)(55016003);DIR:OUT;SFP:1102 x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?u3XoxzZD2KLtd4NfZSnO5httpN0dJQ7jYEHeGtYb7AxT8lvWMIGS3oEi0UDG?= =?us-ascii?Q?HqCGx52FIYpy0tOzvUA4b0VwhfKqQqN8QNwIb59FH/EXLDYemU1+iFnd7NPc?= =?us-ascii?Q?4LQb9zaenxJtMaytu4ZGHUC9/3mIfh8ehEXLBA1STb2jiO+ya8OD31U/Wxpg?= =?us-ascii?Q?zilUzk11LbHPrIm0GwO/J/bjwx0Nx/QhXrIyuh9VHrNR/IvC1Oi/PFotSdtR?= =?us-ascii?Q?mm75bwfQuHTS1EUJzjPutTMpktzEekr+yKhDTg4WtYUoiKNBqjx9xGth0OXj?= =?us-ascii?Q?pMS4ZpMVRHWXk+RYg0hNiRyGzwm4TTq+SZXhY+SEpwCJN1Ye22kb2DG97ZbZ?= =?us-ascii?Q?FLo765agRJa5FpVdGSmG68jYTeBKKXquBC26jum5u2cdr+I1G81n/v4HbEQK?= =?us-ascii?Q?mIwJeRIMJq65nDB9Xg+8llZbh+xVhOkPyifkFQfGIK94OaF02LJ28Z9IFj85?= =?us-ascii?Q?e3D/WaesjsbLh4+5cXaQJbeN5I1OopzJQxejQDjGt8rTRbdjv+Rw3Lun+8OL?= =?us-ascii?Q?QmGgtceeXeuQ0k9tqsfb0znsFCXG5Cv+sowEOyvpmWlH9pps/hdhDXke68wZ?= =?us-ascii?Q?RWZJV7f4Yy/QiUEYx6GbUheHvjk3l9qjKWWaOz0BJzRqCpeRzya8xBAuwMsL?= =?us-ascii?Q?O9EBNzoBncUqxv1BT5gAbtEGbM06BnA5s/h6KeZHgif5e21DWrXO35PyWNez?= =?us-ascii?Q?OWggMESsKh7ixx1iy93Ijwws6Vi4FqUyQrK7s0wRwFnaLOINF/kbGS1VNQHt?= =?us-ascii?Q?K2cnYWfkYlG7BaCW6EFEVGCuS3koFj1smPSHAXl+39n9XYa/Uh3IyFPrt3lV?= =?us-ascii?Q?rz3Ekge/sAkZUU1YFkj2+KyzQLLJGCwUgQcBTwA7IZmVTfqRevrfCt0jf1Yk?= =?us-ascii?Q?lF5XdYhpH6+mUApgMbndvUU8nk4Rwb6dolMR44BBuupbhGk2l47UBwhKhdvR?= =?us-ascii?Q?cX9HNSYOzmfrsoTrH77yBnGOAcpZlsbAyO7A9tQ+7KjH1TiVPFgIcgi4ycv5?= =?us-ascii?Q?cfBRJj/2SWGVXS+LUUwUI/mX5CWp+MFv5tv8X9twkviZngGp5rhAsF/a1aoX?= =?us-ascii?Q?sczafowo0oH4RiRjsZcr+WT7dEzsx5IWUANUlguDuQC2SE2BzljsiFzEUtGI?= =?us-ascii?Q?2QMsaRh+5idgIL2SV0N2tnzBnKg5N6fFvk16vq9Gd+VQkOIZxVyVPewje8Eb?= =?us-ascii?Q?KLjRu3IZECC1QbsxkDzbXfZXiQNpYN6mI/H2XHohd/jCHi+8lo29a7v4O3q+?= =?us-ascii?Q?21kXK2r2+HkHFsktHSb6gVk2UMiXFnVu/ynNZZ4gcvHy/7gxABqy49TEeJuT?= =?us-ascii?Q?aSJPnqsufq/gCUTe87Bw5Ca+fyi5Murh259rOEzcUkE2Ue5VkkmAJaT6XCke?= =?us-ascii?Q?MgQT1kMvNhAFdMsjpS4h6B4mYc/sbLI2qgK4IGEQOUIquLvQtlkyTxsKmlcG?= =?us-ascii?Q?E6NK7WbtBinx8WdbVYEgh/g1XL9VEOet384htmUnPELCt9Rpm4/oge3xedZT?= =?us-ascii?Q?r/ccxZ1BWPl0/4L4Hjl40CNqHY+4cdI24uAyvjJNhV0lItWDGFCb/WfGccBt?= =?us-ascii?Q?uFBJdkGqiX7fkrxUTkWWImGOBYs4ABdRja4Fa5bFB6lHPbfykCSyMDKlroDN?= =?us-ascii?Q?HrUHtNRCcyVONjR4Xd2NUdTvF+/lSu0IPhM0sOQLwYdV?= MIME-Version: 1.0 X-OriginatorOrg: hp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR84MB1520.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: ed391dbe-f740-4c24-43f8-08dab2e722bd X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Oct 2022 22:05:01.5896 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: ca7981a2-785a-463d-b82a-3db87dfc3ce6 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: d8d0hdLHHWDBHtMTeMs3xcBcX6UFDO+x9s57rB3aWKr4GHtttUz3JtU3iLhDSXH1tKK75wWx42G4KDs1SL1V2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR84MB1354 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: hp.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_DM4PR84MB15206ACA41F359EFF5708551BA2A9DM4PR84MB1520NAMP_" --_000_DM4PR84MB15206ACA41F359EFF5708551BA2A9DM4PR84MB1520NAMP_ Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Below patch didn't resolve https://bugzilla.tianocore.org/show_bug.cgi?id= =3D4011 since AhciRecoverPortError return success on incorrect drive passwo= rd and continues with additional retries before returning to caller. From: Wu, Hao A Sent: Tuesday, October 18, 2022 8:37 PM To: Anbazhagan, Baraneedharan ; Albecki, Mateusz ; devel@edk2.groups.io Cc: Ni, Ray Subject: RE: [PATCH 1/1] MdeModulePkg/Ata: Fix command status reporting CAUTION: External Email Hello Baraneedharan Anbazhagan, Could you help to check if this patch can resolve the issue https://bugzill= a.tianocore.org/show_bug.cgi?id=3D4011 when switching back to: "#define AHCI_COMMAND_RETRIES 5"= ? This change can be accessed for integration at: https://github.com/tianocor= e/edk2/commit/f2eb27e00ed55cca03964f13a2839e41e2c1f61f.patch Best Regards, Hao Wu > -----Original Message----- > From: Albecki, Mateusz > > Sent: Tuesday, October 18, 2022 11:54 PM > To: devel@edk2.groups.io > Cc: Albecki, Mateusz >; Wu, Hao A > >; Ni, Ray > > Subject: [PATCH 1/1] MdeModulePkg/Ata: Fix command status reporting > > Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4016 > > AtaAtapiPassThru driver was reporting recovery status on failed command > packets which led to incorrect flows in upper layers and to SCT tests > fails. This commit will change the logic to report command status. > > > Cc: Hao A Wu > > > Cc: Ray Ni > > > > Signed-off-by: Mateusz Albecki > > --- > .../Bus/Ata/AtaAtapiPassThru/AhciMode.c | 19 +++++++++++-------- > 1 file changed, 11 insertions(+), 8 deletions(-) > > diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c > b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c > index a240be940d..06c4a3e052 100644 > --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c > +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c > @@ -949,6 +949,7 @@ AhciPioTransfer ( > EFI_AHCI_COMMAND_LIST CmdList; > > UINT32 PrdCount; > > UINT32 Retry; > > + EFI_STATUS RecoveryStatus; > > > > if (Read) { > > Flag =3D EfiPciIoOperationBusMasterWrite; > > @@ -1026,8 +1027,8 @@ AhciPioTransfer ( > > > if (Status =3D=3D EFI_DEVICE_ERROR) { > > DEBUG ((DEBUG_ERROR, "PIO command failed at retry %d\n", Retry)); > > - Status =3D AhciRecoverPortError (PciIo, Port); > > - if (EFI_ERROR (Status)) { > > + RecoveryStatus =3D AhciRecoverPortError (PciIo, Port); > > + if (EFI_ERROR (RecoveryStatus)) { > > break; > > } > > } else { > > @@ -1122,6 +1123,7 @@ AhciDmaTransfer ( > EFI_PCI_IO_PROTOCOL *PciIo; > > EFI_TPL OldTpl; > > UINT32 Retry; > > + EFI_STATUS RecoveryStatus; > > > > Map =3D NULL; > > PciIo =3D Instance->PciIo; > > @@ -1220,8 +1222,8 @@ AhciDmaTransfer ( > Status =3D AhciWaitUntilFisReceived (PciIo, Port, Timeout, SataFisD2H); > > if (Status =3D=3D EFI_DEVICE_ERROR) { > > DEBUG ((DEBUG_ERROR, "DMA command failed at retry: %d\n", Retry)); > > - Status =3D AhciRecoverPortError (PciIo, Port); > > - if (EFI_ERROR (Status)) { > > + RecoveryStatus =3D AhciRecoverPortError (PciIo, Port); > > + if (EFI_ERROR (RecoveryStatus)) { > > break; > > } > > } else { > > @@ -1261,14 +1263,14 @@ AhciDmaTransfer ( > Status =3D AhciCheckFisReceived (PciIo, Port, SataFisD2H); > > if (Status =3D=3D EFI_DEVICE_ERROR) { > > DEBUG ((DEBUG_ERROR, "DMA command failed at retry: %d\n", Task- > >RetryTimes)); > > - Status =3D AhciRecoverPortError (PciIo, Port); > > + RecoveryStatus =3D AhciRecoverPortError (PciIo, Port); > > // > > // If recovery passed mark the Task as not started and change the status > > // to EFI_NOT_READY. This will make the higher level call this function > again > > // and on next call the command will be re-issued due to IsStart being > FALSE. > > // This also makes the next condition decrement the RetryTimes. > > // > > - if (Status =3D=3D EFI_SUCCESS) { > > + if (RecoveryStatus =3D=3D EFI_SUCCESS) { > > Task->IsStart =3D FALSE; > > Status =3D EFI_NOT_READY; > > } > > @@ -1375,6 +1377,7 @@ AhciNonDataTransfer ( > EFI_AHCI_COMMAND_FIS CFis; > > EFI_AHCI_COMMAND_LIST CmdList; > > UINT32 Retry; > > + EFI_STATUS RecoveryStatus; > > > > // > > // Package read needed > > @@ -1415,8 +1418,8 @@ AhciNonDataTransfer ( > Status =3D AhciWaitUntilFisReceived (PciIo, Port, Timeout, SataFisD2H); > > if (Status =3D=3D EFI_DEVICE_ERROR) { > > DEBUG ((DEBUG_ERROR, "Non data transfer failed at retry %d\n", Retry)); > > - Status =3D AhciRecoverPortError (PciIo, Port); > > - if (EFI_ERROR (Status)) { > > + RecoveryStatus =3D AhciRecoverPortError (PciIo, Port); > > + if (EFI_ERROR (RecoveryStatus)) { > > break; > > } > > } else { > > -- > 2.28.0.windows.1 --_000_DM4PR84MB15206ACA41F359EFF5708551BA2A9DM4PR84MB1520NAMP_ Content-Type: text/html; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable

Below patch didn’t resolve https://bugzilla.tianocore.org/show_bug.cgi?id=3D4011 since AhciRecover= PortError return success on incorrect drive password and continues with add= itional retries before returning to caller.

 

From: Wu, Hao A <hao.a.wu@intel.com> Sent: Tuesday, October 18, 2022 8:37 PM
To: Anbazhagan, Baraneedharan <anbazhagan@hp.com>; Albecki, Ma= teusz <mateusz.albecki@intel.com>; devel@edk2.groups.io
Cc: Ni, Ray <ray.ni@intel.com>
Subject: RE: [PATCH 1/1] MdeModulePkg/Ata: Fix command status report= ing

 

CAUTION: External Email=

Hello Baraneedharan Anbazhagan,

Could you help to check if this patch can resolve the issue https://bugzilla.tianocore.org/show_bug.cgi?id=3D4011 when switching ba= ck to: "#define AHCI_COMMAND_RETRIES 5"?
This change can be accessed for integration at: https://github.com/tianocore/edk2/commit/f2eb27e00ed55cca03964f13a2839e41e2= c1f61f.patch

Best Regards,
Hao Wu

> -----Original Message-----
> From: Albecki, Mateusz <mateusz.albecki@intel.com>
> Sent: Tuesday, October 18, 2022 11:54 PM
> To: devel@edk2.groups.io > Cc: Albecki, Mateusz <= mateusz.albecki@intel.com>; Wu, Hao A
> <hao.a.wu@intel.com>; = Ni, Ray <ray.ni@intel.com> > Subject: [PATCH 1/1] MdeModulePkg/Ata: Fix command status reporting >
> Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4016
>
> AtaAtapiPassThru driver was reporting recovery status on failed comman= d
> packets which led to incorrect flows in upper layers and to SCT tests<= br> > fails. This commit will change the logic to report command status.
>
>
> Cc: Hao A Wu <hao.a.wu@intel.= com>
>
> Cc: Ray Ni <ray.ni@intel.com>
>
>
> Signed-off-by: Mateusz Albecki <
mateusz.albecki@intel.com>
> ---
> .../Bus/Ata/AtaAtapiPassThru/AhciMode.c | 19 +++++++++++--------
> 1 file changed, 11 insertions(+), 8 deletions(-)
>
> diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
> b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
> index a240be940d..06c4a3e052 100644
> --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
> +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
> @@ -949,6 +949,7 @@ AhciPioTransfer (
> EFI_AHCI_COMMAND_LIST CmdList;
>
> UINT32 PrdCount;
>
> UINT32 Retry;
>
> + EFI_STATUS RecoveryStatus;
>
>
>
> if (Read) {
>
> Flag =3D EfiPciIoOperationBusMasterWrite;
>
> @@ -1026,8 +1027,8 @@ AhciPioTransfer (
>
>
> if (Status =3D=3D EFI_DEVICE_ERROR) {
>
> DEBUG ((DEBUG_ERROR, "PIO command failed at retry %d\n", Ret= ry));
>
> - Status =3D AhciRecoverPortError (PciIo, Port);
>
> - if (EFI_ERROR (Status)) {
>
> + RecoveryStatus =3D AhciRecoverPortError (PciIo, Port);
>
> + if (EFI_ERROR (RecoveryStatus)) {
>
> break;
>
> }
>
> } else {
>
> @@ -1122,6 +1123,7 @@ AhciDmaTransfer (
> EFI_PCI_IO_PROTOCOL *PciIo;
>
> EFI_TPL OldTpl;
>
> UINT32 Retry;
>
> + EFI_STATUS RecoveryStatus;
>
>
>
> Map =3D NULL;
>
> PciIo =3D Instance->PciIo;
>
> @@ -1220,8 +1222,8 @@ AhciDmaTransfer (
> Status =3D AhciWaitUntilFisReceived (PciIo, Port, Timeout, SataFisD2H)= ;
>
> if (Status =3D=3D EFI_DEVICE_ERROR) {
>
> DEBUG ((DEBUG_ERROR, "DMA command failed at retry: %d\n", Re= try));
>
> - Status =3D AhciRecoverPortError (PciIo, Port);
>
> - if (EFI_ERROR (Status)) {
>
> + RecoveryStatus =3D AhciRecoverPortError (PciIo, Port);
>
> + if (EFI_ERROR (RecoveryStatus)) {
>
> break;
>
> }
>
> } else {
>
> @@ -1261,14 +1263,14 @@ AhciDmaTransfer (
> Status =3D AhciCheckFisReceived (PciIo, Port, SataFisD2H);
>
> if (Status =3D=3D EFI_DEVICE_ERROR) {
>
> DEBUG ((DEBUG_ERROR, "DMA command failed at retry: %d\n", Ta= sk-
> >RetryTimes));
>
> - Status =3D AhciRecoverPortError (PciIo, Port);
>
> + RecoveryStatus =3D AhciRecoverPortError (PciIo, Port);
>
> //
>
> // If recovery passed mark the Task as not started and change the stat= us
>
> // to EFI_NOT_READY. This will make the higher level call this functio= n
> again
>
> // and on next call the command will be re-issued due to IsStart being=
> FALSE.
>
> // This also makes the next condition decrement the RetryTimes.
>
> //
>
> - if (Status =3D=3D EFI_SUCCESS) {
>
> + if (RecoveryStatus =3D=3D EFI_SUCCESS) {
>
> Task->IsStart =3D FALSE;
>
> Status =3D EFI_NOT_READY;
>
> }
>
> @@ -1375,6 +1377,7 @@ AhciNonDataTransfer (
> EFI_AHCI_COMMAND_FIS CFis;
>
> EFI_AHCI_COMMAND_LIST CmdList;
>
> UINT32 Retry;
>
> + EFI_STATUS RecoveryStatus;
>
>
>
> //
>
> // Package read needed
>
> @@ -1415,8 +1418,8 @@ AhciNonDataTransfer (
> Status =3D AhciWaitUntilFisReceived (PciIo, Port, Timeout, SataFisD2H)= ;
>
> if (Status =3D=3D EFI_DEVICE_ERROR) {
>
> DEBUG ((DEBUG_ERROR, "Non data transfer failed at retry %d\n"= ;, Retry));
>
> - Status =3D AhciRecoverPortError (PciIo, Port);
>
> - if (EFI_ERROR (Status)) {
>
> + RecoveryStatus =3D AhciRecoverPortError (PciIo, Port);
>
> + if (EFI_ERROR (RecoveryStatus)) {
>
> break;
>
> }
>
> } else {
>
> --
> 2.28.0.windows.1

--_000_DM4PR84MB15206ACA41F359EFF5708551BA2A9DM4PR84MB1520NAMP_--