coreboot-kgpe-d16/payloads/libpayload/drivers/usb
Julius Werner 3faa2c802e libpayload: usbhid: Zero-initialize all parts of usbhid instance struct
The USBHID driver zero-initializes some but not all of the fields in its
usbhid_inst_t structure. This is a problem because under some
circumstances, some of the uninitialized fields may be read and lead to
incorrect behavior. Some (broken) USB keyboards keep sending reports
that contain all zeroes even when they have no new keys... these usually
get silently ignored, but if the usbhid_inst_t structure is in an
inconsistent state where 'previous' is zeroed out but 'lastkeypress'
is non-zero because it wasn't properly initialized, these reports will
be interpreted as keyrepeats of the bogus 'lastkeypress'. This patch
changes the code to just xzalloc() the whole structure so we won't have
to worry about initialization issues anymore.

Change-Id: Ic987de2daaceaad2ae401a1e12b1bee397f802ee
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/23766
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2018-02-16 00:08:26 +00:00
..
Kconfig libpayload: Reintroduce CONFIG_LP_CHROMEOS to set suitable defaults 2016-10-17 22:46:11 +02:00
TODO
dwc2.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
dwc2.h tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
dwc2_private.h tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
dwc2_rh.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
ehci.c libpayload: usb: dwc2: support split transaction 2015-07-16 22:39:59 +02:00
ehci.h libpayload: Use unsigned long for BARs in *hci_init() 2014-07-10 20:55:41 +02:00
ehci_private.h Rename __attribute__((packed)) --> __packed 2017-07-13 19:45:59 +00:00
ehci_rh.c libpayload: EHCI: Support root-hub TT feature 2015-03-23 17:57:40 +01:00
generic_hub.c libpayload: usb: Remove generic roothub reset port function 2014-10-02 17:28:47 +02:00
generic_hub.h libpayload: usb: Remove generic roothub reset port function 2014-10-02 17:28:47 +02:00
ohci.c payloads: Add whitespace around '<<' 2017-06-28 00:23:18 +00:00
ohci.h libpayload: Use unsigned long for BARs in *hci_init() 2014-07-10 20:55:41 +02:00
ohci_private.h Rename __attribute__((packed)) --> __packed 2017-07-13 19:45:59 +00:00
ohci_rh.c libpayload: usb: Fix up usb_shutdown() code paths 2014-11-13 06:22:45 +01:00
quirks.c Remove empty lines at end of file 2015-06-08 00:55:07 +02:00
uhci.c libpayload: usb: Remove automatic clear_stall() calls from transfers 2014-11-13 06:22:58 +01:00
uhci.h
uhci_private.h Rename __attribute__((packed)) --> __packed 2017-07-13 19:45:59 +00:00
uhci_rh.c libpayload: Improve sanity checking in UHCI driver 2015-02-23 21:59:25 +01:00
usb.c libpayload: usb: handle situation with no free device address 2017-01-06 18:43:05 +01:00
usb_dev.c
usbhid.c libpayload: usbhid: Zero-initialize all parts of usbhid instance struct 2018-02-16 00:08:26 +00:00
usbhub.c libpayload: usbhub: Force enumeration of all connected ports on init 2017-03-15 00:54:23 +01:00
usbinit.c libpayload: Make Kconfig bools use IS_ENABLED() 2015-06-30 18:55:15 +02:00
usbmsc.c Rename __attribute__((packed)) --> __packed 2017-07-13 19:45:59 +00:00
xhci.c libpayload: usb: xhci: Support rockchip xHCI controller 2016-06-12 12:09:55 +02:00
xhci.h libpayload: Use unsigned long for BARs in *hci_init() 2014-07-10 20:55:41 +02:00
xhci_commands.c libpayload: usb: Support MTK xHCI host controller 2015-06-03 11:11:59 +02:00
xhci_debug.c libpayload: usb: Add support for SuperSpeed hubs 2015-07-18 09:40:48 +02:00
xhci_devconf.c libpayload: xhci: plug leak 2017-01-06 18:42:18 +01:00
xhci_events.c libpayload: xhci: Carry over fixes from Chromium tree 2015-08-14 15:14:09 +02:00
xhci_private.h Rename __attribute__((packed)) --> __packed 2017-07-13 19:45:59 +00:00
xhci_rh.c libpayload: usb: xhci: Fix list of cleared port change bits 2015-08-14 15:18:16 +02:00