From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web11.5306.1604884636539496259 for ; Sun, 08 Nov 2020 17:17:16 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=HZoXfF7O; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: hao.a.wu@intel.com) IronPort-SDR: nBTdFbFotvR/PngfH7+xKI33W7oGsFrp8bsoe62rhWbAnJx87EG9NUTHcQ2ds+DSus4mUl03QN +sCwu9xHNe+A== X-IronPort-AV: E=McAfee;i="6000,8403,9799"; a="156743903" X-IronPort-AV: E=Sophos;i="5.77,462,1596524400"; d="scan'208";a="156743903" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2020 17:17:15 -0800 IronPort-SDR: CjUFKgpjvvb5uMLzj6pQ+qosOt5qutvV8W2dXEkF5IeEMvkwGrxtEutXJrK/eSkPixREL0beir Dr5ubgYV4AVw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,462,1596524400"; d="scan'208";a="364866109" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by FMSMGA003.fm.intel.com with ESMTP; 08 Nov 2020 17:17:14 -0800 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sun, 8 Nov 2020 17:17:14 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Sun, 8 Nov 2020 17:17:14 -0800 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (104.47.45.59) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Sun, 8 Nov 2020 17:17:13 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CoJLBYmQ5Z6OBZPVZmNfjdcdkG1NXVzQBVDAXkT31y1tQCtANAKW5il88bvjv4qDkWs1exPzKYwRlleEkhvtXGHD0CJckTNvmv/xFUIs25FDH+dm9xyoOaoTJoQcHT6w4E2zOXIALtgxTO+8ag3CS3OPLZ2lJC1Y7Vvg57AiHJPHoyYVzFpG5SsDXeep5Kj/6VsjQSX83UcAaKQyMSbWlAQeApdvwWWNhimlByg24D/aVLj2ktce5kPq5jvuNiKf7n6sOzmbNKIwou8N5N/0Lrfrz82CS9OK01lHOkRQOzyYaBGmR+R86uQVqL/0nn0s1gDuFTtri3x87npOfygu4g== 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=Ctj2ERYU3LKgUftL0uC2jE92vZhMp6V1hGZDdX2UwfE=; b=DnzRN86qKuPzT1E+0n1YwFNpnzSG7IANregsVrjXmlVmlN1Z0PpPXvGdqxh5VGjxvsXslEA4PHDmVQXdGInBq7IGj1iGUGCiinkfeZUEl6tCZ0qaExzMNknr+ZMZDaw8H1VnCFjFWv1TZKoeIn7suPeCJO6tAhsSHH4ZpEu/cyHv0mU7yTZfoCt44MqvOY31hZLymUVGcW4otJTlxTQYRlvpSQ4UWPNMK+znqUWM9edQsmkofVGA7gGfwHRkYUmNO5oMyVHEJKKoXHILi1eHaExOaslTd087VM7XOeoBUUgBSDHrjuBceg+iFWuRUglqE9KMjxvouE1G29hfzAf2cw== 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=Ctj2ERYU3LKgUftL0uC2jE92vZhMp6V1hGZDdX2UwfE=; b=HZoXfF7OaLPU/2bZ2bbS/2c5iM/Nv+ExDxY+KELGGyo5EO2DVud8yY3N+J5Z1cqCaco5q2tN8oW+dfdQF5OmCwPE59qZ4MAb9vdWlBVJDRBdHbcm+dGqCb0AbfE5jm+5+oXJWY0LvW8g7kqsEdo2Nswnhl4nKX4E4sQjdCQaQ1s= Received: from BN8PR11MB3666.namprd11.prod.outlook.com (2603:10b6:408:8c::19) by BN6PR11MB4033.namprd11.prod.outlook.com (2603:10b6:405:78::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.23; Mon, 9 Nov 2020 01:17:12 +0000 Received: from BN8PR11MB3666.namprd11.prod.outlook.com ([fe80::c123:faac:1da3:f807]) by BN8PR11MB3666.namprd11.prod.outlook.com ([fe80::c123:faac:1da3:f807%5]) with mapi id 15.20.3499.032; Mon, 9 Nov 2020 01:17:12 +0000 From: "Wu, Hao A" To: "Albecki, Mateusz" , "devel@edk2.groups.io" CC: "Ni, Ray" 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: AQHWs3D4Cm8Vl5vJQkuncLnB3wdsIKm5fWIwgAWG/cA= Date: Mon, 9 Nov 2020 01:17:12 +0000 Message-ID: References: <16449D11B4E4D780.24349@groups.io> In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.218] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1945888e-2fba-41ff-ded3-08d8844d3003 x-ms-traffictypediagnostic: BN6PR11MB4033: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:418; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: uIyUZxUbRSs6auvgiR+6M66fLIvw8u77GQlK98qpeCkqTjmbABheBLN6Hqk9yjzoPW0YiZ1Ap2LMtwtsl8Ymgb8Fr4Vf8CbtYnj/9wDgEGnP05oY2LW8UkikSZro98QSYOJ0Z8LV0jfy1FHQRaYqWWmSBl9ySBS3dDC7wDLSu3oPtfMLL4gF826D+2gV4fWjvcPfRC0iMx/8nT5B9tE+EvGGrc24OmFw9OtI99x2EeNlMeoIPYmoeG2MrZThK/3WmYqFpw/PYDOMDZi9q9YtcR/T2oli1ABWhXx7WBpc3yHlYsU7zq3S48pCiruA6DuPhrUY+Jfr3TnRyVc32+CcHTTJFfSUyUYCobqGRTOlOtX7Iae+ab27im/Ns1YoFtEZVTN10G/2agYh9kSKoFHYEw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR11MB3666.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(39860400002)(366004)(376002)(346002)(136003)(396003)(107886003)(8676002)(33656002)(2906002)(83380400001)(66556008)(66946007)(66476007)(71200400001)(76116006)(5660300002)(64756008)(66446008)(8936002)(52536014)(478600001)(110136005)(186003)(53546011)(55016002)(86362001)(4326008)(316002)(26005)(966005)(9686003)(6506007)(7696005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: IS+xXmguq+2hCCFpBRTJYcmXLRYr6avOOeZzRz8KSpmuEuQCx99mYiX9GhlRQAJlJTtCWQsXdwIGfoQ77Av9zV6owEcBYfA4toasgxT0adQIRpqDUdJdKYW6Mjl0k7VAnnjORsoFOSeeX1Rlz52HyUKyhEtp7j9t7YCzz04XVDMVqXgSKpHt139ktT53THvlnQFCL7KLXxPlWYkj2ZosOpaSNT/Sa4EiOvoe77i0siidWCx1VJrV79VjDOzBHAqK8JFiXERN0OPbssGhMb4+z5kpmiGQa/A3idD6lGgPhFZlWrZzxqAA4AaIx6fzzLuncO/NiuVtKime5rLRv0hH1FQQIYDCsr/ONrIN6XzKi+R5SNaUjX3j/CCgaCs1nmlsUlf1Oi3zsfppFRJy+Ab+jYGUm1N3YpoqbnVdSptEv42oe2lCXxNsvGcnO9wqmH5esVAWIqIlFTwmpsVe+s+cI31gnqALaLvAgdOrteJKnBB3AMie9Wgt/XIJwJ0n6Hge8k1zH7UGuzVtm4PXvBilptUWyVUWKzkJacNgiHw21TkfKBoidLbzD8e2B4ahNwYm8KN2IQXmhD6fItmKfUrjyW8amU2ZK+vXVZwrz+jsqqDZiXG5vkvriBU+fcPvR2yIdFWcA75IfykYTsZ9vOIobw== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN8PR11MB3666.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1945888e-2fba-41ff-ded3-08d8844d3003 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Nov 2020 01:17:12.4174 (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: kdgU400R7aRHVpTD0HT7q56bm5pKWkCj16dFKPrdfZ/fpl/4pwipQwcvfkdta4v7sq/MtQd7ZX4ugBI5MCVQYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB4033 Return-Path: hao.a.wu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Albecki, Mateusz > Sent: Thursday, November 5, 2020 8:51 PM > 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 >=20 > Forgot to put BZ tracker into v2 commit msg so I have resent the series = as v3 > with proper bz info. (Seems no separate cover-letter sent for V3, replies here) I have given my 'R-b' tags for the V3 series: https://edk2.groups.io/g/devel/topic/78049844#67059 https://edk2.groups.io/g/devel/topic/78049845#67060 https://edk2.groups.io/g/devel/topic/78049846#67061 https://edk2.groups.io/g/devel/topic/78049847#67063 Will wait a couple of days to see if there are comments from others. Best Regards, Hao Wu >=20 > > -----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 > > > > To increase boot stability when booting from SATA drives SATA driver > > should implement the AHCI spec defined port error recovery. This will > > allow the driver to handle random fails on SATA link. > > > > 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). > > > > Tests performed: > > 1. Booted control setup to OS successfully. > > 2. Checked if during normal boot none of the packets is repeated(this > > came 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 > > packet 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). > > > > 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 > > > > Some more information: > > For the bug mentioned above in point 2, the discussion can be referred > here: > > > https://github.com/malbecki/edk2/commit/9ea81cadf38725e194ec01e0b0c5 > > 56fd133f3ced#r43226067 > > > > For the other discussion we did before this patch, please refer to: > > https://github.com/malbecki/edk2/commits/sata_recovery > > > > 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 > > > > Changes in v2: > > - Changed logging per review suggestions > > - Fixed small issues with commit message > > > > Signed-off-by: Mateusz Albecki > > > > Cc: Ray Ni > > Cc: Hao A Wu > > > > > > 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 > > > > .../Bus/Ata/AtaAtapiPassThru/AhciMode.c | 799 +++++++++++------= - > > .../Bus/Ata/AtaAtapiPassThru/AhciMode.h | 18 +- > > 2 files changed, 532 insertions(+), 285 deletions(-) > > > > -- > > 2.28.0.windows.1 > > > > --------------------------------------------------------------------- > > 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 > > the sole use of the intended recipient(s). If you are not the intended > > recipient, please contact the sender and delete all copies; any review > > or distribution by others is strictly prohibited. > > > > > > > > > >=20 > >