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.web08.3963.1665390580576873432 for ; Mon, 10 Oct 2022 01:29:41 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=kgkAOOgG; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665390580; x=1696926580; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=vmKQqHFksjHf4Bm8LJPIKxBxjP15jmfCk59XsnBYAEI=; b=kgkAOOgG6y5ehHT6DIJGAVW1kIOnkUYoLFBWRxih0LiixUuaudl+/1Fo SsmVCH5JXTZlzrkrcTXDcYVsMwiXgDUe9bv6Ds/hZm0hm2oXOAnYkbVqv pdtfAqgR0qvwJJW+eI3VNetkckj+BYodg3CyuatY6YmDwCW2R9N9nCIel MqbPLHr4lSdcyqRdMygsvf/kLtwX2y5qbN+drrJRDUuXbOR+0qjophzMh 44/107Uz6cjrP8vG9m3t55qYETrYCU7vTbtjGDgBcyMNT5jNEVZ+HBHNX Ey/wa9a7eTXwg4s/Zcm06LLzCnh5TS5au0xBjjqZMm5zzitipU8TKPf8x w==; X-IronPort-AV: E=McAfee;i="6500,9779,10495"; a="305767860" X-IronPort-AV: E=Sophos;i="5.95,173,1661842800"; d="scan'208";a="305767860" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2022 01:29:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10495"; a="688707785" X-IronPort-AV: E=Sophos;i="5.95,173,1661842800"; d="scan'208";a="688707785" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga008.fm.intel.com with ESMTP; 10 Oct 2022 01:29:39 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) 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.2375.31; Mon, 10 Oct 2022 01:29:39 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 10 Oct 2022 01:29:38 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Mon, 10 Oct 2022 01:29:38 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.107) 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.2375.31; Mon, 10 Oct 2022 01:29:38 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aleT1mukK4mPTK90deG+5oG3MgeSTC0y8KrkBLL7a02qo2MXNz59EyD0IfsYck9nirPTp0ai6Mwr/wYftXziAcE1qbW4GF7pVObWvlTGudfsrwpvtt4Euo+dI33bfqGLNHe45o9PBS+hdhHRdQMZrMrcUfrYfnV5jFk9uv681+/4pY62OJn8XWSRyD25j7Con9J+usQbcqTavYW4WJeMu7YG9kJFt4/2DpQPCNe8npv7a48mZYvGHpFm+Ar+JzzhyKQgdB/zxzfgwXsbtGQZmTRGg8x+6aiAwwSeL3HWKuytKkL4s6welUKJ5UlkBuR6njsCyS8GjtV6tzHYnCw7xw== 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=PF4BAiBXWr05bm/KrFx1a4d61YEc83ARkDNy9qdNPT8=; b=cDPCXM1j6NWw8lJHDsN9nCzGLlzQxBNjqtZBtRJlwqs1RGnMEvXbvg9JEe2rMF6K5sYf/szclm6VjPxXzNuxGhysK35+sX9/PFoZmuOjsNvADVF4rUL5eNi4Dkpai5CSRBhahJ4xzXufx+gBAGix5h/mN0F2NkxiUm+20I/wek7vyAsn4pFDJuu19TR6UYZ7baShIp8s6hmuWQFOZZt1VcU0s+/Yx6vAGCfwGtvZrpPrZ8lQQOa6us+dC/ipSd9dXvAW5RR7ZwVPHa8jK4LrdsPpluibhDCLMnxWpMEGp+77/+qNp/q/i3L7DopN2kQhQZdN+9zC0rbINheVHlESPQ== 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 Received: from MWHPR11MB1631.namprd11.prod.outlook.com (2603:10b6:301:10::10) by DS0PR11MB6495.namprd11.prod.outlook.com (2603:10b6:8:c1::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.28; Mon, 10 Oct 2022 08:29:35 +0000 Received: from MWHPR11MB1631.namprd11.prod.outlook.com ([fe80::483f:4bb5:a15f:f571]) by MWHPR11MB1631.namprd11.prod.outlook.com ([fe80::483f:4bb5:a15f:f571%11]) with mapi id 15.20.5709.015; Mon, 10 Oct 2022 08:29:35 +0000 From: "Ni, Ray" To: "devel@edk2.groups.io" , "Rhodes, Sean" CC: "Dong, Guo" , Matt DeVillier , "Wu, Hao A" Subject: Re: [edk2-devel] [PATCH] Ps2KbdCtrller: Make wait for SUCCESS after BAT non-fatal Thread-Topic: [edk2-devel] [PATCH] Ps2KbdCtrller: Make wait for SUCCESS after BAT non-fatal Thread-Index: AQHYHx4uytxyX7UMS06kP3zbkBUOdK4Ixr/w Date: Mon, 10 Oct 2022 08:29:35 +0000 Message-ID: References: <793abb11501c3fe8d4b8c82267cb9a30bcfa9c3a.1644566720.git.sean@starlabs.systems> In-Reply-To: <793abb11501c3fe8d4b8c82267cb9a30bcfa9c3a.1644566720.git.sean@starlabs.systems> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MWHPR11MB1631:EE_|DS0PR11MB6495:EE_ x-ms-office365-filtering-correlation-id: f0c075a3-3a51-4a70-010b-08daaa99908a x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: KZ6d37uWRHGv3qOE6lNKijZgtbZOc0F0xjGx6x6R+aDeEzYZks1aU0p8ooR1OKt84WjqXLFB2G3TzUelLVkc7F7RNQbUL8Rr3rLQWv+SiUyE7R7AHzCkcE/QQl43+h/bgnJyICeVJIK2yKrys/fDKROjuzZ1+FEy9BIhER4GqqmFWHKFUoLHgBECViLANERDRZ5kefMSHlhg2uPnsgKHntute6Nm6o+hwmqnmx1C4jdu83ehRoU9Dprj7FbLhdveEv1SRfEehgLmGHt8E0veNlZeHaquwnWK6Dv2VUYR7xnVZef7xHRTUDVL64zfyAmTOInG42GnYtCOyn5Hf0KL+J8vRPhRjQZnXtPQWrjh1yYGZV2MtQgClliecZ9c52vTbQZFBFFFtWffciFPl/f037ayX5OcqQUJxWrWN20M0mcJeX/KDGKbKVQSALqO0SgNFbY1r/dgqu43zW0ANHp8WbuMs6Tr2k+m285VNa+cKvgZjhuDsXskTkI0WmkqxCyOHVirHi5d8rXGZY8IFG32iGEWKdhpjpft0Jiro2jENsH1AorDyBNHh9ERwMWjB9SvkqbvEAW7XBiGa9N4tbR26HG3HrBbkkrRm9cAoHdqk3teOln8uTql0GJyVsxQwzeI4WrnjWJKB+2CNwipPbtLHccER8B6CC/hktDml7yz5RWbENEwkRNYgredQMTCHLl3K+uiOxrU/mnxuMGGxewlMYcAgaKVZnQoPGxqx0QQJzQammt2egI2Oapzda5XxIqaPOrbQyROnNiWDCKfdtQEUJHzCH4oOFHc7GSu31fyEGBtyD01OWXUdO6aPS9Z7qq1VsKp/LAslAVr2K4S1pw+Vw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR11MB1631.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(396003)(136003)(346002)(39860400002)(376002)(366004)(451199015)(66899015)(71200400001)(5660300002)(8936002)(478600001)(52536014)(122000001)(53546011)(7696005)(316002)(107886003)(54906003)(2906002)(82960400001)(41300700001)(110136005)(38100700002)(83380400001)(186003)(86362001)(9686003)(66476007)(966005)(66946007)(76116006)(26005)(38070700005)(33656002)(66556008)(55016003)(19627235002)(64756008)(66446008)(6506007)(8676002)(4326008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?b8ReQjdhe27tOClCXZslwRA6kkVGELsSqPFm+MJoUJ0+GJ1q9UycTxH+uw6W?= =?us-ascii?Q?FXcWzzZfI9U5puwS2tJZ7xUWALomqJ8t+0qIGDSJ6wH1/SkiQghzdZa2bgAb?= =?us-ascii?Q?qKOaFUddA1oDLwYzsANnI1N8O5KKeFBeVK9wb+aRpFpeZIMBbTimZjq2aiUj?= =?us-ascii?Q?ttjhnVaBCQ1KUf42kCYF+c82++bCl1WqqK/LXsowpzgPOHKqqR0uMcdJ8XD1?= =?us-ascii?Q?DteJGgZt8hy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HX6gJ8xBcef?= =?us-ascii?Q?Yt27lt8j9dzurWCZPEhyPIG7jy9KE9PhgKEY4sNtBKaYQ1F3g3F4aj1tka83?= =?us-ascii?Q?kxtifSaj8Bm+q+tIyZKgKPmj4hniHqPJPlfcvF/2H8Op4vEZ7KNzbeBrRrcd?= =?us-ascii?Q?f7zfCTY5if003U4v6GvSNoWXEJ4qF1JpvYz6uTk7khiFa5kuRGdLPO1J20I4?= =?us-ascii?Q?rkvd7FIZqRApAV2eAcf1xzPQP1/j/+iCLkXn4srcvtpJqiYLti5meFIcJ38c?= =?us-ascii?Q?SHYwWofl6y7GOZ8oqsmo9MJ9NWPTNzpOMdAOs3G5+26RTjHesDxvBiFcPE0H?= =?us-ascii?Q?Vc8NpoP/OQtGZw0en32OlzYAc1WwsUDro8hbXqO2zE8GhryoAstqcBVf0iYi?= =?us-ascii?Q?Dl9KuqMVKUXGbfPhqWN0lvzk2O5qxPLeydiT6gNXKdrv1tvWIUqVRQJf/Fec?= =?us-ascii?Q?V/p70od0DTAJM3MClWy8vfrULpLuute3WkhzC71I?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1631.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f0c075a3-3a51-4a70-010b-08daaa99908a X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Oct 2022 08:29:35.7715 (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: 96lT2CQn3xd5oh69C6GAlpDGcr7mABPKPp/hqVhon8+3awBfG4lRu5G9L8BDUmEyExmSh7s2uj4oiGYToXEGuA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB6495 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Sean > Rhodes > Sent: Friday, February 11, 2022 4:05 PM > To: devel@edk2.groups.io > Cc: Dong, Guo ; Matt DeVillier > ; Wu, Hao A ; Ni, Ray > ; Rhodes, Sean > Subject: [edk2-devel] [PATCH] 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 > Cc: Hao A Wu > Cc: Ray Ni > Signed-off-by: Matt DeVillier > Signed-off-by: Sean Rhodes > --- > MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c | 6 +----- > MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h | 2 +- > 2 files changed, 2 insertions(+), 6 deletions(-) >=20 > diff --git a/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c > b/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c > index 77dc226222..6c71355edd 100644 > --- a/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c > +++ b/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c > @@ -1733,11 +1733,7 @@ InitKeyboard ( > // >=20 > mWaitForValueTimeOut =3D KEYBOARD_BAT_TIMEOUT; >=20 >=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); >=20 >=20 >=20 > mWaitForValueTimeOut =3D KEYBOARD_WAITFORVALUE_TIMEOUT; >=20 >=20 >=20 > diff --git a/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h > b/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h > index ca1dd9b2c2..38df3e092d 100644 > --- a/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h > +++ b/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h > @@ -157,7 +157,7 @@ InstallPs2KeyboardDriver ( > #define KEYBOARD_MAX_TRY 256 // 256 >=20 > #define KEYBOARD_TIMEOUT 65536 // 0.07s >=20 > #define KEYBOARD_WAITFORVALUE_TIMEOUT 1000000 // 1s >=20 > -#define KEYBOARD_BAT_TIMEOUT 4000000 // 4s >=20 > +#define KEYBOARD_BAT_TIMEOUT 1000000 // 1s >=20 > #define KEYBOARD_TIMER_INTERVAL 200000 // 0.02s >=20 > #define SCANCODE_EXTENDED0 0xE0 >=20 > #define SCANCODE_EXTENDED1 0xE1 >=20 > -- > 2.32.0 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#86611): https://edk2.groups.io/g/devel/message/86611 > Mute This Topic: https://groups.io/mt/89066601/1712937 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [ray.ni@intel.com] > -=3D-=3D-=3D-=3D-=3D-=3D >=20