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.web11.78347.1679590518616944875 for ; Thu, 23 Mar 2023 09:55:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hp.com header.s=mimecast20180716 header.b=i2suE2du; 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=1679590517; 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=yxuLpB4vTeoZfj6y0ZFYFsft2w+KwrxZKfunBeEB3HQ=; b=i2suE2dudYOlh4754HiorCfTGPdEL8Q8cuk5s3hUc9eGtDs2fI6qxzS8mS1nLtrmTpgpmo ZmJWfPHw0XVu+hPqOseSX4XV9ebJi/clpboQ29WmFmsSALXixDH3b4GMhoSXXzcO5P+SOk kxwz4sLMTpZwyVuJjAqT7qVwvrEm6Vg= Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11lp2169.outbound.protection.outlook.com [104.47.56.169]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-60-qIyIxvM-O1aFnck-eQvIlg-1; Thu, 23 Mar 2023 12:55:14 -0400 X-MC-Unique: qIyIxvM-O1aFnck-eQvIlg-1 Received: from DM4PR84MB1520.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:8:4b::12) by DM4PR84MB1445.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:8:48::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37; Thu, 23 Mar 2023 16:55:12 +0000 Received: from DM4PR84MB1520.NAMPRD84.PROD.OUTLOOK.COM ([fe80::4538:1b25:3627:c727]) by DM4PR84MB1520.NAMPRD84.PROD.OUTLOOK.COM ([fe80::4538:1b25:3627:c727%4]) with mapi id 15.20.6178.038; Thu, 23 Mar 2023 16:55:11 +0000 From: "Anbazhagan, Baraneedharan" To: "devel@edk2.groups.io" , "hao.a.wu@intel.com" , "Albecki, Mateusz" CC: "Ni, Ray" , "Chang, Hunter" Subject: Re: [edk2-devel] [PATCH 0/1] MdeModulePkg/Ahci: Skip retry for non-transient errors Thread-Topic: [edk2-devel] [PATCH 0/1] MdeModulePkg/Ahci: Skip retry for non-transient errors Thread-Index: AQHZXDKnz+mHwfIPPk+e5x8VKAFxIK8GXx8AgAI3rAA= Date: Thu, 23 Mar 2023 16:55:11 +0000 Message-ID: References: <20230321202015.1877-1-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_|DM4PR84MB1445:EE_ x-ms-office365-filtering-correlation-id: 84ffca56-aa03-4ae2-b535-08db2bbf5de0 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0 x-microsoft-antispam-message-info: 0YE3j8JtJjF17qorVIaugxqqbjxH2ER0zsqPPz7udTvumL3TQyWPYS6VhmlefSWdAJcRb/XM59iVACOPgT4Ic8Ke07a2hx5cVDZ1apoEiHGfL9JJ8l30z7Zx51SLghiM6eceAbYie7SBvCWXwr4Sl7u+BkQqNX8CTMCaRnkeTwdnuvjrryvH5IysrY7FFhBYeBHGe2ydLiQRlZomxByQtbGAw9vrg7p5wMEiE4k+JpbGl51aPyOJONKLWg4j++YfzdQmIiw04RFAjA9v2cnyOdRG/1Bh6277FNwOfiCd3oh6Q1T+gt9ZLLSfBVev97CTePxq1LFhQAgzlHt8qACEqPOxnYOHj6p8SmyTARpcPDjsmcu6Vg3nfVR7CEE3wb7a6q+FaldWMZ3TQ3wlYFlmvyOR8K5Lo7se4+tSvjqjQ7MBj1xKtSUK+UqewzaB//6xMP4cD2WXZEd1qCkOSigiTAazWkf7HHLK2xIgvpGAMpduPkY7GaRpXnSRBL4X0hDBlomBWINiqakm39Ix1fwx/8CcaYZTdhTQM59WUWQNkg6Sp8ap8P12tr0OZAzxfx/1Ls7Qhd9soU6U1HqJeCc4cCMfrGztx2DF3yWxasxQupEhlOXamKS6LQQaGCbNMq0J9z8vBBmzYzitNzoxyNZHNMRofTMTjep1Ptjgcc6j3ENzCTTZgxhlXQN5iEUCXv3K3dhFi35SZOQU8eQ4EOkho/vhpXXcSER9/IJDRgAEbeI= 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:(13230025)(4636009)(39860400002)(396003)(136003)(376002)(346002)(366004)(451199018)(71200400001)(66446008)(8676002)(76116006)(66946007)(52536014)(66476007)(66556008)(64756008)(4326008)(110136005)(54906003)(5660300002)(41300700001)(82960400001)(122000001)(9326002)(53546011)(8936002)(26005)(6506007)(186003)(9686003)(478600001)(83380400001)(966005)(33656002)(316002)(7696005)(86362001)(55016003)(166002)(38070700005)(38100700002)(2906002)(66899018);DIR:OUT;SFP:1102 x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?u+MFpGVmy4Mgf1L2i9OMzGEm6tgzrgUSPqJwF+/Eg/R+2a8EOpJPmUaC2K7y?= =?us-ascii?Q?h2dSx9Z0ilBLyu08dLhlUZig02WJQjRMLMsWQI9y8x87ehGF/NMFxZBwf7XL?= =?us-ascii?Q?C5NGOXR5n+Pk24kczZRJHrYpb77g6UqJ0k3EO28nnPhgwd7AOfARsQuPeU1O?= =?us-ascii?Q?lxYYp1AKgcOP8K+qrpf95rJmd9ij437ZJ3Tu05Xkd6SVlkwbPCzzTDNr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ZSYb/xyXIYppS0wSqLBig5pZ?= =?us-ascii?Q?vOfceDNfqIjHTWlAYZi3KhLfIJ8OmROWflyW3XvbtHko4YYOkrnob6a3C53h?= =?us-ascii?Q?cXvN8G+GWPR2jTw1zeywQnA4fg/vZeh4knbDZ0eM0FiZnBUirPcsJMrlXslt?= =?us-ascii?Q?is5sCLVNz1MluQfSbheB4Ph+5Afu//Mtvm7bHPcn01mDey9g9FR6f+pVtqUn?= =?us-ascii?Q?iumJWnhqiT3vjxbo35ruxeqXKyJdJcSB6ysDOJlUt/6FFZ0Ex/vZGrjSgFeA?= =?us-ascii?Q?BfIV+qwdoKPb9MuSfKn86WnpWgnvv3vZudw3mgLKD4yEZ4d8QSOuUgelTqgF?= =?us-ascii?Q?hy3WUkjjmt4ae1Qt4PdvIzOecccObmzWUSyvVcH5uaEfhVOKTEmQviHZpqoF?= =?us-ascii?Q?gUjdVauiaTcoPjeV6EbvmcvGKwwGDGYWLtCjDTSDcp+uaFgJ/UY2hf4cjcDr?= =?us-ascii?Q?V+tqA1BfFncN/F7i978=3D?= 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: 84ffca56-aa03-4ae2-b535-08db2bbf5de0 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Mar 2023 16:55:11.5740 (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: EuqS1DPpE2OyilpUUKjKqWsA803VOcF8LwAdrInYNYqnNpgWtTy33TEQKjEsGUJDOoMkz2rkhp72adnJhf4NnA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR84MB1445 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: hp.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_DM4PR84MB1520E9AAB2E533A24D5BE254BA879DM4PR84MB1520NAMP_" --_000_DM4PR84MB1520E9AAB2E533A24D5BE254BA879DM4PR84MB1520NAMP_ Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Hi, This patch seems to resolve the issue reported in 4011 - MdeModulePkg: Need= configurable AHCI command retries (tianocore.org) and verified with 'AHCI_COMMAND_RETRIES' as = 5. Able to unlock the drive with correct password on 2nd attempt after prov= iding an incorrect password. Thanks, Baranee From: devel@edk2.groups.io On Behalf Of Wu, Hao A vi= a groups.io Sent: Wednesday, March 22, 2023 1:59 AM To: Albecki, Mateusz ; Anbazhagan, Baraneedharan= ; devel@edk2.groups.io Cc: Ni, Ray ; Chang, Hunter Subject: Re: [edk2-devel] [PATCH 0/1] MdeModulePkg/Ahci: Skip retry for non= -transient errors CAUTION: External Email Thanks Mateusz, the patch looks good to me. I noticed that there are some check failures in https://github.com/tianocor= e/edk2/pull/4157, could you he= lp to address them? 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://patch-diff.githubus= ercontent.com/raw/tianocore/edk2/pull/4157.patch Thanks in advance. Best Regards, Hao Wu > -----Original Message----- > From: Albecki, Mateusz > > Sent: Wednesday, March 22, 2023 4:20 AM > To: devel@edk2.groups.io > Cc: Albecki, Mateusz >; Wu, Hao A > >; Ni, Ray >; Chang, Hunter > > > Subject: [PATCH 0/1] MdeModulePkg/Ahci: Skip retry for non-transient erro= rs > > Fix for the recovery logic which causes hdd unlock to fail if user suppli= es > incorrect password. Every failed packet used to be recovered which is cau= sing > the incorrect password to be tried multiple times. This patch series fixe= s the > logic to only retry commands that failed due to CRC error. > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4011 > > Github pull: https://github.com/tianocore/edk2/pull/4157 > > Tests: > - tested basic linux boot from AHCI on qemu > - tested basic linux boot from AHCI on custom qemu which will fail 50% of= the > DMA commands with CRC error. > Observed that all of the packets that failed were successfully retried. C= ustom > Qemu: https://github.com/matalbec/qemu/tree/sata_dma_50p_fail > - additionally Hunter Chang tested and confirmed that the password issue = is no > longer observed. > > Cc: Hao A Wu > > Cc: Ray Ni > > Cc: Hunter Chang > > > Mateusz Albecki (1): > MdeModulePkg/Ahci: Skip retry for non-transient errors > > .../Bus/Ata/AtaAtapiPassThru/AhciMode.c | 69 +++++++++++++++++-- > .../Bus/Ata/AtaAtapiPassThru/AhciMode.h | 3 +- > 2 files changed, 67 insertions(+), 5 deletions(-) > > -- > 2.39.1.windows.1 --_000_DM4PR84MB1520E9AAB2E533A24D5BE254BA879DM4PR84MB1520NAMP_ Content-Type: text/html; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable

Hi,

This patch seems to resolve the issue reported in 4011 – MdeModulePkg: Need configurable AHCI command retries (tianocor= e.org) and verified with ‘AHCI_COMMAND_RETRIES’ as 5. Able = to unlock the drive with correct password on 2nd attempt after p= roviding an incorrect password.

 

Thanks,

Baranee

 

From: devel@edk2.groups.io <devel@edk2.gro= ups.io> On Behalf Of Wu, Hao A via groups.io
Sent: Wednesday, March 22, 2023 1:59 AM
To: Albecki, Mateusz <mateusz.albecki@intel.com>; Anbazhagan, = Baraneedharan <anbazhagan@hp.com>; devel@edk2.groups.io
Cc: Ni, Ray <ray.ni@intel.com>; Chang, Hunter <hunter.chang= @intel.com>
Subject: Re: [edk2-devel] [PATCH 0/1] MdeModulePkg/Ahci: Skip retry = for non-transient errors

 

CAUTION: External Email=

Thanks Mateusz, the p= atch looks good to me.
I noticed that there are some check failures in https://github.com/tianocore/edk2/pull/4157, could you help to address = them?


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://patch-diff.githubusercontent.com/raw/tianocore/edk2/pull/4157.patch=
Thanks in advance.

Best Regards,
Hao Wu

> -----Original Message-----
> From: Albecki, Mateusz <mateusz.albecki@intel.com>
> Sent: Wednesday, March 22, 2023 4:20 AM
> 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>; C= hang, Hunter
> <hunter.chang@intel.com>
> Subject: [PATCH 0/1] MdeModulePkg/Ahci: Skip retry for non-transient e= rrors
>
> Fix for the recovery logic which causes hdd unlock to fail if user sup= plies
> incorrect password. Every failed packet used to be recovered which is = causing
> the incorrect password to be tried multiple times. This patch series f= ixes the
> logic to only retry commands that failed due to CRC error.
>
> BZ:
https://bugzilla.tianocore.org/show_bug.cgi?id=3D4011
>
> Github pull: https://github.com/tianocore/edk2/pull/4157
>
> Tests:
> - tested basic linux boot from AHCI on qemu
> - tested basic linux boot from AHCI on custom qemu which will fail 50%= of the
> DMA commands with CRC error.
> Observed that all of the packets that failed were successfully retried= . Custom
> Qemu: https://github.com/matalbec/qemu/tree/sata_dma_50p_fail
> - additionally Hunter Chang tested and confirmed that the password iss= ue is no
> longer observed.
>
> Cc: Hao A Wu <hao.a.wu@intel.= com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Hunter Chang <
hunter.= chang@intel.com>
>
> Mateusz Albecki (1):
> MdeModulePkg/Ahci: Skip retry for non-transient errors
>
> .../Bus/Ata/AtaAtapiPassThru/AhciMode.c | 69 +++++++++++++++++--
> .../Bus/Ata/AtaAtapiPassThru/AhciMode.h | 3 +-
> 2 files changed, 67 insertions(+), 5 deletions(-)
>
> --
> 2.39.1.windows.1



--_000_DM4PR84MB1520E9AAB2E533A24D5BE254BA879DM4PR84MB1520NAMP_--