From a3e0bc8e4e66da7119bf954b1747f70c92e1466b Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Tue, 20 Dec 2011 09:58:18 -0800 Subject: CHROMIUMOS: fix key stroke detection in recovery mode When we re-enumerate USB devices to configure new USB mass storage key, we must also properly configure the USB keyboard if there is one connected. Signed-off-by: Vincent Palatin BUG=chrome-os-partner:5752 chrome-os-partner:6344 chromeos-partner:7188 TEST=on Lumpy, insert and remove a USB key in recovery mode and check that TAB still triggers the recovery reason screen. Change-Id: I4bf908023e21c027f6abcb49f168abb3013ed707 Reviewed-on: https://gerrit.chromium.org/gerrit/13251 Reviewed-by: Stefan Reinauer Tested-by: Stefan Reinauer --- lib/vbexport/boot_device_usb.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/vbexport/boot_device_usb.c b/lib/vbexport/boot_device_usb.c index e8872e2c4e..8a384154a4 100644 --- a/lib/vbexport/boot_device_usb.c +++ b/lib/vbexport/boot_device_usb.c @@ -14,6 +14,9 @@ #include "boot_device.h" #include +#include + +extern int board_use_usb_keyboard(int boot_mode); static int is_enumerated; @@ -40,6 +43,10 @@ static int boot_device_usb_start(uint32_t disk_flags) usb_stop(); if (usb_init() >= 0) { +#ifdef CONFIG_USB_KEYBOARD + if (board_use_usb_keyboard(FIRMWARE_TYPE_RECOVERY)) + drv_usb_kbd_init(); +#endif usb_stor_scan(/*mode=*/1); is_enumerated = 1; } -- cgit v1.2.3