From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web12.6852.1604580655586046851 for ; Thu, 05 Nov 2020 04:50:55 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=wpNRXaBK; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: mateusz.albecki@intel.com) IronPort-SDR: jjzT/o9wQCHneVLZq/6wfRRzei33XHCvl/1y8sB0ZIBqWfdZRCgw7vzf+R6wsHF4K2nzY8AftC k+ik/tS3U3ig== X-IronPort-AV: E=McAfee;i="6000,8403,9795"; a="231001300" X-IronPort-AV: E=Sophos;i="5.77,453,1596524400"; d="scan'208";a="231001300" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Nov 2020 04:50:51 -0800 IronPort-SDR: SCegEGPPE8tLEnhveDb5RgY74opQWyK41KqSk+XSO2SzXFIJkcoqitp2f6bmIqpvGos4ppYhSP j/IinvM8mn+w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,453,1596524400"; d="scan'208";a="354270793" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by fmsmga004.fm.intel.com with ESMTP; 05 Nov 2020 04:50:50 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 5 Nov 2020 04:50:50 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 5 Nov 2020 04:50:50 -0800 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (104.47.37.59) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Thu, 5 Nov 2020 04:50:45 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kKJJkCZsj9llxGmAlBh5oM/fA5BITBMSrDxyoo9Vk2P5e34TN7SgHjCIxs93Sl5j0NJvhzNgIkM5w9T0h/mxO8nf5jZ1lI2mUcKKJ1Gr+DcEpu1ustOeJpM2xfreaT/l6FjSz/bQeDIY+lqsZHqYg4skrQtRI8tH1kjg2OR5Q+YG3JdhK3TS1ZhlhDeEGyet7I8erk/oHaExP5+NvfWp66x7XouFvPQkGtN03osl1862FP5iifs6vbvGiy6kaz8uUAl6mGgrELx7OxGrmJJ6dR1wgQt3zmgiGhBH85BF+lRtOxu2m2v9gYTuek24l/8dlk+3ttk5wHAuD0ezSJ6ujA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zppr9VORtX4ArZ4/tfDcEvEZDnDGnF/KN2Ji4W+Quks=; b=IiQ/pRXQhWchXYhJGVHGovK5EbewGaoMtTzBQPDAXYZonXuXC/Ph+RRzVRIXv+7Axfu+wu0xeMk6SM5ESSag+vNP32JOTKjrFmVy4lS/rQZkx77ZWmbR84VzdqfMhGPmKIpzrZgFFdmxNyykjlSEgq9cmV27tK8+EUi9LFXtbPbF9VyO85cekH9xta7r9nc41VJZGeFP4KUf/XLOlghR4+PbMjiPZikGFixrEc01EnWPPpmhOUfIaZkRg8WqaTIHu/OmD91cD1Hnmk7HGWRKHbT5KmBAUEWYbvYFB2pXEVPtPW6F+iI7CK7UrriMsbGui+inHxTfTPMXe1TEw+aD0A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zppr9VORtX4ArZ4/tfDcEvEZDnDGnF/KN2Ji4W+Quks=; b=wpNRXaBKMsYm1cfnS8d3ylNeebigUVNZIJnzZipoT/+mEGUqGOIE3iB5wMbQ64hnB+Hl4ocPXA15qr10FS/sVuEk6DalHHh4O8UPch4PeSCnYsZD8oi383iwAolvi6/3L74/TwfZWngJuzOs4kEvYb9XCaKULUb9FEiFdUMZLPk= Received: from SN6PR11MB3535.namprd11.prod.outlook.com (2603:10b6:805:ce::21) by SN6PR11MB2944.namprd11.prod.outlook.com (2603:10b6:805:cd::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.32; Thu, 5 Nov 2020 12:50:44 +0000 Received: from SN6PR11MB3535.namprd11.prod.outlook.com ([fe80::314d:1fd2:bae7:fc7b]) by SN6PR11MB3535.namprd11.prod.outlook.com ([fe80::314d:1fd2:bae7:fc7b%5]) with mapi id 15.20.3499.032; Thu, 5 Nov 2020 12:50:44 +0000 From: "Albecki, Mateusz" To: "devel@edk2.groups.io" , "Albecki, Mateusz" CC: "Ni, Ray" , "Wu, Hao A" Subject: Re: [edk2-devel] [PATCHv2 0/4] MdeModulePkg/AtaAtapiPassThru: Add SATA error recovery Thread-Topic: [edk2-devel] [PATCHv2 0/4] MdeModulePkg/AtaAtapiPassThru: Add SATA error recovery Thread-Index: AQHWs3D4Cm8Vl5vJQkuncLnB3wdsIKm5fWIw Date: Thu, 5 Nov 2020 12:50:44 +0000 Message-ID: References: <16449D11B4E4D780.24349@groups.io> In-Reply-To: <16449D11B4E4D780.24349@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [109.241.215.111] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 363f1624-6a4a-4cd2-57e6-08d8818968ff x-ms-traffictypediagnostic: SN6PR11MB2944: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:348; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: TsbTlwqThcozOG3vq5shyaTJp5ATtZlUohGdQkqR9eQLYXvMz7NhBiGfgp1CLc2LWt7h4aQWJ7t2WX++kt0W6GcBrNGbIR5TX3k7KiVN0w4Up7LKdKJs/YOxklwgX/XtixuhwxwVTdvHbhW0hjEJ85QAt4QIxFIfnGNuBDWoEnZP9LIBibBrF9VTvTF1JILsxjshJ1rfCi+UvnkuGsWXqaqp71ByVcOvN9XvEbdTnBVJV5Q6rW6S5bhkPLAvqFYvdxWnhWt7i8g5u7vkYU11YGIh9wj9CDElirXDYq4FX4SiUz88ux9JPHOetDSazL5+YRjX9LzTgYluVfn8qCVDy3wl88ylHU1fokMJ2JgzDKDiGXmLmV9KLUeC97elRSUOEvH0p5Vo0+iCVHGc1e7m0A== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR11MB3535.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(39860400002)(396003)(366004)(136003)(346002)(376002)(66556008)(110136005)(52536014)(66446008)(2906002)(9686003)(5660300002)(8936002)(76116006)(71200400001)(66946007)(64756008)(54906003)(55016002)(316002)(107886003)(53546011)(6506007)(4326008)(7696005)(86362001)(186003)(66476007)(83380400001)(8676002)(33656002)(26005)(966005)(478600001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: L5jdLYnTfYz0nzYZAwU8n9J+7z/LKkw4hMRbmtr3BTFmEHMwXCorWVA95JGef9lpr636W/oFknZoOMWX16VjB9/i4DNC/Il9/u+avECVND5ig28PZpp7JOEnvh/cTKCC5Ox9mMgCYSzqCxr9RZsk547xdL0jd7nSnnkIVyLc+eV1kVePCKXUC94VPMBehpllEgWyvqcVQXWo0OYHch4yc+toiIlCp1QEpnWlK92ph+SalcWIWKaacViFvEXAZJUaaPYk7XQsA0tj8G2ifHIZb++abbp0828q97Ok+O1tD9amEgN8963QFyJCIaGkE9JtilXyIv2BpHeETPhHvhNdPFj/G74JV3E+0l+5mq9ABr4G0pnUhcCyWfLlkn0jeCigfiijLW0rj8n7i3WeMmTLC4RV1eswQ9LUb9FjwwEeH+NRvhb/2Xv2rpxXfCfSynKpXihI4yB6UHDS+GojoNK7/DibvGwMfOUelhzV8623Y85htucLG8d3ghHvafBEuXIWVICJnEuWjxd5+2cKZWePirEfvFanwNWdtuQqY05Gof7czSyUF07GsxjBwdR1ZrsRB8iAxkwcGfHlo/8IuCIwvGXG5A9xqCH4JOcaN0ih39fU8cSfzZrvJpwZbZEjakGi2u+kdTMv3tyyAb5ssvmHAg== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB3535.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 363f1624-6a4a-4cd2-57e6-08d8818968ff X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Nov 2020 12:50:44.4322 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: oqDddt9SGAbhjmhQlgKvuJYkxswaiMSfX3vybOdpTZ7E5ifzNZyfL6DguNXd93TZTQxYhlvemYxAUZlzWVgw9erXKNuNHQLmeOV4TuSiZcA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2944 Return-Path: mateusz.albecki@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Forgot to put BZ tracker into v2 commit msg so I have resent the series as = v3 with proper bz info. > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Albecki, > Mateusz > Sent: Thursday, November 5, 2020 1:41 PM > To: devel@edk2.groups.io > Cc: Albecki, Mateusz ; Ni, Ray > ; Wu, Hao A > Subject: [edk2-devel] [PATCHv2 0/4] MdeModulePkg/AtaAtapiPassThru: > Add SATA error recovery >=20 > To increase boot stability when booting from SATA drives SATA driver sho= uld > implement the AHCI spec defined port error recovery. This will allow the > driver to handle random fails on SATA link. >=20 > Performed tests on 2 setups. One with AHCI controller booting OS > successfully without error recovery(control setup) and other which fails= 1 in 5 > times(fail setup). >=20 > Tests performed: > 1. Booted control setup to OS successfully. > 2. Checked if during normal boot none of the packets is repeated(this ca= me > up after previous code version had a bug which repeated each DMA packet = 5 > times). > 3. Booted control setup to OS with simulated errors appearing on first p= acket > of every DMA transaction. > 4. Performed extensive tests on fail setup. Fail rate decreased from 20% > failure to ~1% failure. 1% failure is observed during OS execution, not = BIOS so > in a way boot is 100% stable). >=20 > Change pushed to github: > This series: > https://github.com/malbecki/edk2/commits/sata_recovery2 > Simulated errors: > https://github.com/malbecki/edk2/commits/sata_recovery_simulated_erro > r >=20 > Some more information: > For the bug mentioned above in point 2, the discussion can be referred h= ere: > https://github.com/malbecki/edk2/commit/9ea81cadf38725e194ec01e0b0c5 > 56fd133f3ced#r43226067 >=20 > For the other discussion we did before this patch, please refer to: > https://github.com/malbecki/edk2/commits/sata_recovery >=20 > For logging here is the example of verbose command log(taken from v1 > patch): > Starting commmand: > ATA COMMAND BLOCK: > AtaCommand: 37 > AtaFeatures: 0 > AtaSectorNumber: 0 > AtaCylinderLow: 16 > AtaCylinderHigh: 16 > AtaDeviceHead: 224 > AtaSectorNumberExp: 57 > AtaCylinderLowExp: 0 > AtaCylinderHighExp: 0 > AtaFeaturesExp: 0 > AtaSectorCount: 64 > AtaSectorCountExp: 0 > DMA command failed at retry: 0 > DMA retry 1 > Starting commmand: > ATA COMMAND BLOCK: > AtaCommand: 37 > AtaFeatures: 0 > AtaSectorNumber: 0 > AtaCylinderLow: 16 > AtaCylinderHigh: 16 > AtaDeviceHead: 224 > AtaSectorNumberExp: 57 > AtaCylinderLowExp: 0 > AtaCylinderHighExp: 0 > AtaFeaturesExp: 0 > AtaSectorCount: 64 > AtaSectorCountExp: 0 > ATA STATUS BLOCK: > AtaStatus: 80 > AtaError: 0 > DMA retry 0 >=20 > Changes in v2: > - Changed logging per review suggestions > - Fixed small issues with commit message >=20 > Signed-off-by: Mateusz Albecki >=20 > Cc: Ray Ni > Cc: Hao A Wu >=20 >=20 > Mateusz Albecki (4): > MdeModulePkg/AtaAtapiPassThru: Check IS to check for command > completion > MdeModulePkg/AtaAtapiPassThru: Add SATA error recovery flow > MdeModulePkg/AtaAtapiPassThru: Restart failed packets > MdeModulePkg/AtaAtapiPassThru: Trace ATA packets >=20 > .../Bus/Ata/AtaAtapiPassThru/AhciMode.c | 799 +++++++++++------- > .../Bus/Ata/AtaAtapiPassThru/AhciMode.h | 18 +- > 2 files changed, 532 insertions(+), 285 deletions(-) >=20 > -- > 2.28.0.windows.1 >=20 > --------------------------------------------------------------------- > Intel Technology Poland sp. z o.o. > ul. Sowackiego 173 | 80-298 Gdask | Sd Rejonowy Gdask Pnoc | VII Wydzia > Gospodarczy Krajowego Rejestru Sdowego - KRS 101882 | NIP 957-07-52-316 > | Kapita zakadowy 200.000 PLN. > Ta wiadomo wraz z zacznikami jest przeznaczona dla okrelonego adresata i > moe zawiera informacje poufne. W razie przypadkowego otrzymania tej > wiadomoci, prosimy o powiadomienie nadawcy oraz trwae jej usunicie; > jakiekolwiek przegldanie lub rozpowszechnianie jest zabronione. > This e-mail and any attachments may contain confidential material for th= e > sole use of the intended recipient(s). If you are not the intended recip= ient, > please contact the sender and delete all copies; any review or distribut= ion by > others is strictly prohibited. >=20 >=20 >=20 >=20 >=20 >=20 --------------------------------------------------------------------- Intel Technology Poland sp. z o.o. ul. Sowackiego 173 | 80-298 Gdask | Sd Rejonowy Gdask Pnoc | VII Wydzia Go= spodarczy Krajowego Rejestru Sdowego - KRS 101882 | NIP 957-07-52-316 | Kap= ita zakadowy 200.000 PLN. Ta wiadomo wraz z zacznikami jest przeznaczona dla okrelonego adresata i m= oe zawiera informacje poufne. W razie przypadkowego otrzymania tej wiadomoc= i, prosimy o powiadomienie nadawcy oraz trwae jej usunicie; jakiekolwiek pr= zegldanie lub rozpowszechnianie jest zabronione. This e-mail and any attachments may contain confidential material for the = sole use of the intended recipient(s). If you are not the intended recipien= t, please contact the sender and delete all copies; any review or distribut= ion by others is strictly prohibited. =20