summaryrefslogtreecommitdiff
path: root/common/power_button_x86.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2014-01-29 09:40:22 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-01-29 21:38:01 +0000
commitc4383ca93f5d2aeb0c03e0b7ae623cf2d1b50ab0 (patch)
treedb4116abe15e55133a3bfb16d014b0286cf8f27b /common/power_button_x86.c
parentcf43a3b7beb13996e0600605c219d05f562de187 (diff)
downloadchrome-ec-c4383ca93f5d2aeb0c03e0b7ae623cf2d1b50ab0.tar.gz
Fix watchdog in keyboard scan if key outside mask pressedtest-5394.B
If a key is pressed which is not in actual_key_mask, this triggers the keyboard scan interrupt. But read_matrix() would use the key mask to decide that no *real* keys were pressed. So it would immediately drop out of scan mode back to interrupt mode. Which would again be triggered. Lather, rinse, repeat, watchdog. The fix is to use the unmasked key matrix to decide whether to stay in scan mode. This way, the keyboard task sleeps between scans, and the watchdog isn't triggered. (Note that the only way you can hit this bug in real life is to have a keyboard attached which can trigger keys not in actual_key_mask. Which is hard to do, unless you've got a new prototype keyboard with extra keys, or you've spilled lemon juice on your Chromebook...) BUG=chrome-os-partner:25333 BRANCH=rambi TEST=Zero out actual_key_mask in keyboard_scan.c. Press a key. Should not trigger a watchdog. Change-Id: I8c2fbc3e06fa12dfae5c06614814af8f04e24a8a Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/184323 Reviewed-by: Dave Parker <dparker@chromium.org> Tested-by: Dave Parker <dparker@chromium.org>
Diffstat (limited to 'common/power_button_x86.c')
0 files changed, 0 insertions, 0 deletions