diff options
author | Vic Yang <victoryang@google.com> | 2015-01-16 14:15:23 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-01-17 23:19:58 +0000 |
commit | 80aa3da22c46357462a3b0778c965a42d1aa1630 (patch) | |
tree | 06f93a3de63e8d32141e0877eaaa0cd75a158485 /common/console.c | |
parent | ca228445ccc48b70b6959c38e263867256462a48 (diff) | |
download | chrome-ec-80aa3da22c46357462a3b0778c965a42d1aa1630.tar.gz |
Only process console input after console task started
If a character is received between uart_init() and task_start(), we
shouldn't try to wake console task. Usually this shouldn't happen
because the input shouldn't be floating, but still, the EC should not
crash in this case.
BRANCH=None
BUG=chrome-os-partner:35308
TEST=Boot on Glower without servo connected. Check the LED is not
blinking.
Change-Id: I62157c3ecd50b5eca6b09c1cf594b65a605546f9
Signed-off-by: Vic Yang <victoryang@google.com>
Reviewed-on: https://chromium-review.googlesource.com/241512
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Vic Yang <victoryang@chromium.org>
Commit-Queue: Vic Yang <victoryang@chromium.org>
Diffstat (limited to 'common/console.c')
-rw-r--r-- | common/console.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/console.c b/common/console.c index 20ec4ce50f..3743eae93a 100644 --- a/common/console.c +++ b/common/console.c @@ -547,7 +547,8 @@ void console_has_input(void) #endif /* Wake up the console task */ - task_wake(TASK_ID_CONSOLE); + if (task_start_called()) + task_wake(TASK_ID_CONSOLE); } void console_task(void) |