From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web10.2777.1644549130220214809 for ; Thu, 10 Feb 2022 19:12:11 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=LzDBtglm; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: hao.a.wu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644549130; x=1676085130; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=SVpWninDuJN1buKd8LNik1bvJOeqYpyZvt9fO08KrTY=; b=LzDBtglmop9kZyMaJonlMBDH1DfDOTQiHMeR/rqSVPzikbGsdUNrmTAD 9LltjNXufBB1iq/F7vqGOhSton+2Gs13Uie00zaB2q4frCE6g+GgAPLAf nYuMKlLkc0czeLrlVpFQaOaSAIeHFQTtxkUXJ2ggEwJUmheO2sHAyPOV5 MtJr4Sk1LD27XSHMZyBvus/bO7xK2ZJmABajByps2GbEt7rKg8sj9CrrT N3fPkUPQS2lD8NPueGl6Lg2+gQNCfgsZb494KU5mTj5Yabp+Rk+HrH7zH t1rQCvAOx/LZcCskuZottyW+1Y85uMufRHdhNMLPP3MjDis++F3Fc2HZh A==; X-IronPort-AV: E=McAfee;i="6200,9189,10254"; a="249594636" X-IronPort-AV: E=Sophos;i="5.88,359,1635231600"; d="scan'208";a="249594636" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 19:12:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,359,1635231600"; d="scan'208";a="701942917" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga005.jf.intel.com with ESMTP; 10 Feb 2022 19:12:09 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 10 Feb 2022 19:12:08 -0800 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 10 Feb 2022 19:12:08 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Thu, 10 Feb 2022 19:12:08 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.174) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Thu, 10 Feb 2022 19:12:08 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jH/UdxbfW3gyyjqzl2vIevePHVJg/gNJHk5yjcsUJkJ5qO+pRCVVQVkC2oC37l0qtZ4g4zbmf48KcNubZ8nPa9oquSSqu8iBBzctnv5vvXp5p9SzWDkoCoIGMRZ+8veidSxXuGaVH/YXUeTFgthrx/dqnndtUlJP38BXHA9ND3SzcGQm2W4IQuP2dHdQHPbuE8nveJ5KADEDgu8SLyX9L/ce0FlOib8goPBsRvRM+9XZ3Bploa2qIkt8YNdn9z1hkJw7DjyL4PRWYHQGlrB+6siblr1u/0/SQ37SJZ3az0BSRlPEmWfZxkqPkmO23WGQiWIfogwebfHO3gDi3Yr7Fg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5fY6zu4s3y1CTeUj13PNG2Wl1+qZgUVOjjhB7VXqZeg=; b=Kygy9W3G21mJrrVRi8VK5XNhx0yWJLPMOVEjoP1i7287exK7pzqtd3Mc7tYSNiCZdhthQ1NBPXoWD/sdjwloVL/+72NuAWJ1hMwIPPyFRgRNl9Jqz0cE1WPjnAYWiGAqGFouW4Nvx/QIXGSDZPxx2jaBoQtyiXGg6EOlxsV6BuBj+NiwSoguEkYipABn9oUuG8m7wSHtLGIS2RzoauGwQZKMB8R6M5eJj7UFM/0iXPEbewseBxuh/BiqD7S52ITqBB6knqI7BFI3MqRBPy8pZgT1nUIf0Ie04C5h07DRyDSBS9x1FTrxhcbrjuFFA52OC3r3o7MtJV74XcGMKeHIuA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from DM6PR11MB4025.namprd11.prod.outlook.com (2603:10b6:5:197::31) by CO1PR11MB4833.namprd11.prod.outlook.com (2603:10b6:303:99::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Fri, 11 Feb 2022 03:12:06 +0000 Received: from DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::707a:603c:30eb:bcdd]) by DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::707a:603c:30eb:bcdd%3]) with mapi id 15.20.4951.019; Fri, 11 Feb 2022 03:12:06 +0000 From: "Wu, Hao A" To: "Rhodes, Sean" , Matt DeVillier , "Ni, Ray" , "devel@edk2.groups.io" CC: "Gao, Liming" , "Wang, Jian J" Subject: Re: [PATCH 12/18] Ps2KbdCtrller: Make wait for SUCCESS after BAT non-fatal Thread-Topic: [PATCH 12/18] Ps2KbdCtrller: Make wait for SUCCESS after BAT non-fatal Thread-Index: AQHYHsTYDHLRbMWwZk+sOJGBHKjen6yNqGKg Date: Fri, 11 Feb 2022 03:12:06 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US, zh-CN X-Mentions: ray.ni@intel.com X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8ef0003d-e202-4cfd-d8d9-08d9ed0c4889 x-ms-traffictypediagnostic: CO1PR11MB4833:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: I6YZSCWIF/PBWksaClQeGbKqYOuZTmcsgc8bWW9qINH8qaP7IEoryJfVrWkYaUNFAz3f1nKBnwgITCK4gNMXF1TpoJO1QN2nwuAiHtNXUiuFukvdcuGijijmC9QdKB9m6dDF+oKheDFJ/opnLvKDNn8mN9CwNQr51Od4rIZJKE/y9sN9P06rfAOBWA6wtlbjkbEka38yLn3sSdk+CyxhYEqDMnyAgA5ChcNgDoHCYrgXfeF/aiT7/lAoECU/QmKiAre2uYByuYoHFcpr7rBX12dM5/svOvc5nCB1pftsecvP77BSX6YodgBvAzZM8NJGYjrWJ7qj1IaHrVebZvHlX4fFAeagc0oDELOE5BoZuKmwJOcCQlyhmY/SR3JN+JA1vxotnVWfDV2F3Bkwc0xIFNgXFpM7XPuPlBfN+L2SUQtohWSddkeyZEQsQal5eV92WvuRVvyWbYg9fGrIQhCZSGpGH8BSAUSTbgo6FgDvwPdkF/SIekEMEHp7TfG0gLOqwZA6BjHj5XaU6ORFrB2RV7ZTR68usCybyHYcYFWZWSGKVWEuOinXlPY2d4ApZhFy/bLSqwFSwtVKczpBdGGE1u1kOnnO6hoWrdUcyTNto9BNtaUatRd7jEPUbsWgo3LMzsPjg3dnEkKATLnnDWQzWzAAJo+iP7UyvuW7W/GfY7584IRzeDk4dP8HezVXmkFu/+fGhjcPOS11fyhWV3Ngg5fMR4Mo187m/l7fvOZd9kqSD0SpMYB4Y9rvhZFn0hnDfFVnrpHxq2wErFPLhw1tq8KaNxYaiw3YJdjIni9vPVk= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4025.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(71200400001)(33656002)(76116006)(186003)(5660300002)(8676002)(66476007)(64756008)(66446008)(66946007)(66556008)(4326008)(8936002)(52536014)(508600001)(316002)(54906003)(55016003)(2906002)(966005)(38070700005)(83380400001)(38100700002)(107886003)(26005)(53546011)(6506007)(86362001)(110136005)(9686003)(82960400001)(122000001)(7696005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?prGEFG2cKr3Sql2b57pPpLPnBbprHyLhx+RVIDoQag0eZOnlF8wXmbOUJJ8U?= =?us-ascii?Q?zOKg8yfpJj6ThNDgB7ohF2Nd8iOXiA3mV/KUXdhDQCAEPVlH1WeTwS5XP3My?= =?us-ascii?Q?gZIZMBJeWMCjGvm3iU0yYcUR33jfpl5k2SgSUPY0M+G6oKxK1VCkHs7C4Psk?= =?us-ascii?Q?EhjcxFaWrSxlCjm2zI+w5Yvu0SrRc7bXWJj3XaMgWP2GxGXGf6nOXoTqPf4g?= =?us-ascii?Q?ebF4QE3Nim3YDdwi3B9j22BdVyMMuuCBS4rS59Pno9mWl2bRSfD37BKSIBvg?= =?us-ascii?Q?+VnSjj1Q5nhLjb6HTCPUZ5I7hQcbQzbK8Z9fAXfOYkT3Z+N1DKGBWfhNMwot?= =?us-ascii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weAcyPySvEK+lXPwK1WKuAp?= =?us-ascii?Q?yNZYU2jth6SYiijh+MlB+A6VJbcxiJvNUYnIGtSD27qkvPKhv50o0BHGJCqG?= =?us-ascii?Q?NXc5OjdeWs+6Xsh3gokZcQZsnboJJBg42Sut3uCoqLk0Fvj3ExIVur2Dlt/f?= =?us-ascii?Q?fLOE46cjg7JcDFecKrLePnEUByc8/NbMehu4qBB+MkZMHHowreom7gW19R31?= =?us-ascii?Q?IhpF7BhxF2E/unTz71AeulFiWFSrlyRZrG3fA6KHPMLWLm5SBqwZadidYVS/?= =?us-ascii?Q?qdIwinmN4ADCahGCo15qClj2vUCaEBoAKUQXlyLbezk95/jADXiLlg1/mgJz?= =?us-ascii?Q?QtV3bt6dvpEHKYjNfT1vdd2/ipzHqZULLMzPokk7aA1w1UjCDGIJ0djOD1w/?= =?us-ascii?Q?Xq9PQCAxkGkc9bA8D5+zrVY=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4025.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8ef0003d-e202-4cfd-d8d9-08d9ed0c4889 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Feb 2022 03:12:06.1082 (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: Q6PEPU2tvyhoaNJqDot832UB3NgT2c/SmiVlEIhs7GyQ0y7eiQjlS37CFbayLfn/RkiEP4ur83i5AwDe93J0Lg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB4833 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 Hello, (Add Ray as the initial author for this driver.) Inline comments below: > -----Original Message----- > From: Sean Rhodes > Sent: Friday, February 11, 2022 5:26 AM > To: devel@edk2.groups.io > Cc: Wu, Hao A ; Matt DeVillier > > Subject: [PATCH 12/18] Ps2KbdCtrller: Make wait for SUCCESS after BAT non= - > fatal >=20 > From: Matt DeVillier >=20 > Recent model Chromebooks only return ACK, but not > BAT_SUCCESS, which causes hanging and failed ps2k init. > To mitigate this, make the absence of BAT_SUCCESS reply > non-fatal, and reduce the no-reply timeout from 4s to 1s. >=20 > Tested on google/dracia and purism/librem_14 >=20 > Signed-off-by: Matt DeVillier > --- > MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) >=20 > diff --git a/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c > b/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c > index 77dc226222..981309f8b0 100644 > --- a/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c > +++ b/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c > @@ -1731,13 +1731,7 @@ InitKeyboard ( > // >=20 > // wait for BAT completion code >=20 > // >=20 > - mWaitForValueTimeOut =3D KEYBOARD_BAT_TIMEOUT; >=20 > - >=20 > - Status =3D KeyboardWaitForValue (ConsoleIn, > KEYBOARD_8048_RETURN_8042_BAT_SUCCESS); >=20 > - if (EFI_ERROR (Status)) { >=20 > - KeyboardError (ConsoleIn, L"Keyboard self test failed!\n\r"); >=20 > - goto Done; >=20 > - } >=20 > + KeyboardWaitForValue (ConsoleIn, > KEYBOARD_8048_RETURN_8042_BAT_SUCCESS); Sorry for lacking of expertise in PS2 domain, I will try my best to provide= comments based on my knowledge. I am fine with removing the hard requirement on successful BAT (assuming pr= oblematic device will eventually fail on subsequent initialization steps). I am also fine with reducing the timeout for BAT to 1 second, since I found= the below information at link: http://www-ug.eecg.toronto.edu/msl/nios_devices/datasheets/PS2%20Keyboard%2= 0Protocol.htm (But I am not sure if the above link is an official spec for PS2 keyboard) "This BAT completion code must be sent 500~750 milliseconds after power-on.= " But please help to update the patch by changing the value of KEYBOARD_BAT_T= IMEOUT macro to 1 second instead of removing line: mWaitForValueTimeOut =3D KEYBOARD_BAT_TIMEOUT; @Ni, Ray, could you help to take a look at this patch as well? Thanks in ad= vance. Best Regards, Hao Wu >=20 >=20 >=20 > mWaitForValueTimeOut =3D KEYBOARD_WAITFORVALUE_TIMEOUT; >=20 >=20 >=20 > -- > 2.32.0