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
dwc2.h
dwc2_private.h
dwc2_rh.c
ehci.c
ehci.h
ehci_private.h Rename __attribute__((packed)) --> __packed 2017-07-13 19:45:59 +00:00
ehci_rh.c
generic_hub.c
generic_hub.h
ohci.c payloads: Add whitespace around '<<' 2017-06-28 00:23:18 +00:00
ohci.h
ohci_private.h Rename __attribute__((packed)) --> __packed 2017-07-13 19:45:59 +00:00
ohci_rh.c
quirks.c
uhci.c
uhci.h
uhci_private.h Rename __attribute__((packed)) --> __packed 2017-07-13 19:45:59 +00:00
uhci_rh.c
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
usbmsc.c Rename __attribute__((packed)) --> __packed 2017-07-13 19:45:59 +00:00
xhci.c
xhci.h
xhci_commands.c
xhci_debug.c
xhci_devconf.c libpayload: xhci: plug leak 2017-01-06 18:42:18 +01:00
xhci_events.c
xhci_private.h Rename __attribute__((packed)) --> __packed 2017-07-13 19:45:59 +00:00
xhci_rh.c