1 inline comment below:
> -----Original Message----- > From: Sean Rhodes <[email protected]> > Sent: Friday, February 18, 2022 3:30 PM > To: [email protected] > Cc: Dong, Guo <[email protected]>; Rhodes, Sean > <[email protected]>; Wu, Hao A <[email protected]>; Ni, Ray > <[email protected]>; Matt DeVillier <[email protected]>; Patrick > Rudolph <[email protected]> > Subject: [PATCH] MdeModulePkg/Usb/Keyboard.c: Don't request protocol > before setting > > No need to check the interface protocol then conditionally setting, > just set it to BOOT_PROTOCOL and check for error. > > This is what Linux does for HID devices as some don't follow the USB spec. > One example is the Aspeed BMC HID keyboard device, which adds a massive > boot delay without this patch as it doesn't respond to 'GetProtocolRequest'. > > Cc: Hao A Wu <[email protected]> > Cc: Ray Ni <[email protected]> > Signed-off-by: Matt DeVillier <[email protected]> > Signed-off-by: Patrick Rudolph <[email protected]> > Signed-off-by: Sean Rhodes <[email protected]> > --- > MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c | 17 +++++------------ > .../Library/BrotliCustomDecompressLib/brotli | 2 +- > 2 files changed, 6 insertions(+), 13 deletions(-) > > diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c > b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c > index 5a94a4dda7..73b5df2b64 100644 > --- a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c > +++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c > @@ -854,22 +854,15 @@ InitUSBKeyboard ( > } > > } > > > > - UsbGetProtocolRequest ( > > - UsbKeyboardDevice->UsbIo, > > - UsbKeyboardDevice->InterfaceDescriptor.InterfaceNumber, > > - &Protocol > > - ); > > // > > // Set boot protocol for the USB Keyboard. > > // This driver only supports boot protocol. > > // > > - if (Protocol != BOOT_PROTOCOL) { > > - UsbSetProtocolRequest ( > > - UsbKeyboardDevice->UsbIo, > > - UsbKeyboardDevice->InterfaceDescriptor.InterfaceNumber, > > - BOOT_PROTOCOL > > - ); > > - } > > + UsbSetProtocolRequest ( > > + UsbKeyboardDevice->UsbIo, > > + UsbKeyboardDevice->InterfaceDescriptor.InterfaceNumber, > > + BOOT_PROTOCOL > > + ); > > > > UsbKeyboardDevice->CtrlOn = FALSE; > > UsbKeyboardDevice->AltOn = FALSE; > > diff --git a/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > b/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > index f4153a09f8..666c3280cc 160000 > --- a/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > +++ b/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > @@ -1 +1 @@ > -Subproject commit f4153a09f87cbb9c826d8fc12c74642bb2d879ea > +Subproject commit 666c3280cc11dc433c303d79a83d4ffbdd12cc8d Why change in BrotliCustomDecompressLib is needed for this patch? Best Regards, Hao Wu > -- > 2.32.0 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#86948): https://edk2.groups.io/g/devel/message/86948 Mute This Topic: https://groups.io/mt/89228276/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
