From: "Wu, Hao A" <hao.a.wu@intel.com>
To: "Rhodes, Sean" <sean@starlabs.systems>,
Matt DeVillier <matt.devillier@gmail.com>,
"Ni, Ray" <ray.ni@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Gao, Liming" <gaoliming@byosoft.com.cn>,
"Wang, Jian J" <jian.j.wang@intel.com>
Subject: Re: [PATCH 12/18] Ps2KbdCtrller: Make wait for SUCCESS after BAT non-fatal
Date: Fri, 11 Feb 2022 03:12:06 +0000 [thread overview]
Message-ID: <DM6PR11MB40256816CD334965592D70FDCA309@DM6PR11MB4025.namprd11.prod.outlook.com> (raw)
In-Reply-To: <ae50cc1ad6602be54a2a14156df03c50bf842977.1644527848.git.sean@starlabs.systems>
Hello,
(Add Ray as the initial author for this driver.)
Inline comments below:
> -----Original Message-----
> From: Sean Rhodes <sean@starlabs.systems>
> Sent: Friday, February 11, 2022 5:26 AM
> To: devel@edk2.groups.io
> Cc: Wu, Hao A <hao.a.wu@intel.com>; Matt DeVillier
> <matt.devillier@gmail.com>
> Subject: [PATCH 12/18] Ps2KbdCtrller: Make wait for SUCCESS after BAT non-
> fatal
>
> From: Matt DeVillier <matt.devillier@gmail.com>
>
> 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.
>
> Tested on google/dracia and purism/librem_14
>
> Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
> ---
> MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> 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 (
> //
>
> // wait for BAT completion code
>
> //
>
> - mWaitForValueTimeOut = KEYBOARD_BAT_TIMEOUT;
>
> -
>
> - Status = KeyboardWaitForValue (ConsoleIn,
> KEYBOARD_8048_RETURN_8042_BAT_SUCCESS);
>
> - if (EFI_ERROR (Status)) {
>
> - KeyboardError (ConsoleIn, L"Keyboard self test failed!\n\r");
>
> - goto Done;
>
> - }
>
> + 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 problematic 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%20Protocol.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_TIMEOUT macro to 1 second instead of removing line:
mWaitForValueTimeOut = KEYBOARD_BAT_TIMEOUT;
@Ni, Ray, could you help to take a look at this patch as well? Thanks in advance.
Best Regards,
Hao Wu
>
>
>
> mWaitForValueTimeOut = KEYBOARD_WAITFORVALUE_TIMEOUT;
>
>
>
> --
> 2.32.0
next prev parent reply other threads:[~2022-02-11 3:12 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <df21ef7edddfef8074ba94514bf73d7a5d0d6046.1644527848.git.sean@starlabs.systems>
2022-02-10 21:20 ` [PATCH 02/18] UefiPayloadPkg: Provide option to use Boot Splash Sean Rhodes
2022-02-10 21:23 ` [PATCH 03/18] MdeModulePackage: Add option to follow BGRT spec Sean Rhodes
2022-02-10 21:23 ` [PATCH 04/18] UefiPayloadPkg: Hookup BGRT build option Sean Rhodes
2022-02-10 21:23 ` [PATCH 05/18] UefiPayloadPkg: Make Boot Manager Key configurable Sean Rhodes
2022-02-10 21:24 ` [PATCH 06/18] UefiPayloadPkg: Add build option for Above 4G Memory Sean Rhodes
2022-02-10 21:24 ` [PATCH 08/18] UefiPayloadPkg: Fix case of protocol Sean Rhodes
2022-02-20 18:11 ` [edk2-devel] " Patrick Rudolph
2022-02-10 21:25 ` [PATCH 09/18] SdMmcPciDxe: Reduce timeout for SD card reset Sean Rhodes
2022-02-11 3:15 ` Wu, Hao A
2022-02-10 21:25 ` [PATCH 10/18] BlSupportSmm: fix definition of SetSmrr() Sean Rhodes
2022-02-20 18:09 ` [edk2-devel] " Patrick Rudolph
2022-02-10 21:25 ` [PATCH 11/18] UefiPayloadPkg: Make Boot Timeout configurable Sean Rhodes
2022-02-10 21:26 ` [PATCH 12/18] Ps2KbdCtrller: Make wait for SUCCESS after BAT non-fatal Sean Rhodes
2022-02-11 3:12 ` Wu, Hao A [this message]
2022-02-10 21:27 ` [PATCH 13/18] MdeModulePkg/Usb/Keyboard.c: don't request protocol before setting Sean Rhodes
2022-02-11 3:32 ` Wu, Hao A
2022-02-11 22:45 ` MrChromebox
2022-02-18 2:17 ` [edk2-devel] " Wu, Hao A
2022-02-10 21:27 ` [PATCH 14/18] UefiPayloadPkg: Add RNG support Sean Rhodes
2022-02-16 23:57 ` Guo Dong
2022-02-10 21:27 ` [PATCH 15/18] UefiPayloadPkg/Library/PlatformBootManagerLib: Remove broken VGA detection Sean Rhodes
2022-02-16 23:51 ` Guo Dong
2022-03-21 9:48 ` [edk2-devel] " Sean Rhodes
2022-03-29 17:32 ` Guo Dong
2022-03-29 17:34 ` Sean Rhodes
2022-03-29 18:01 ` Guo Dong
2022-03-29 18:04 ` Sean Rhodes
2022-03-29 18:22 ` Guo Dong
2022-02-10 21:28 ` [PATCH 16/18] UefiCpuPkg: Disable MTRR programming for UefiPayloadPkg Sean Rhodes
2022-02-10 22:06 ` [edk2-devel] " Michael D Kinney
2022-02-11 7:12 ` Patrick Rudolph
2022-02-10 21:29 ` [PATCH 17/18] BmBoot: prioritize internal boot devices over external Sean Rhodes
2022-02-10 21:29 ` [PATCH 18/18] UefiPayloadPkg: Hookup Prioritise Internal build option Sean Rhodes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DM6PR11MB40256816CD334965592D70FDCA309@DM6PR11MB4025.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox