Cr50: Fix console message on unexpected USB event

We were referring to unhandled USB control messages as errors,
but they aren't necessarily. Sometimes they're optional things
that aren't fatal. We should still address them, but we don't
have to freak out.

BUG=none
BRANCH=none
TEST=make buildall; test on Cr50

Change-Id: I892acec2d89b8ec95353cdc09f3e49aa78b1704d
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/335200
Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
Bill Richardson
2016-03-24 19:11:36 -07:00
committed by chrome-bot
parent b45e7c85d0
commit 7fcd0590eb

View File

@@ -161,17 +161,17 @@ DECLARE_CONSOLE_COMMAND(usb, command_usb,
NULL);
/* When debugging, print errors as they occur */
#define report_error(dummy) \
print_later("USB ERROR at usb.c line %d: 0x%x", \
__LINE__, dummy, 0, 0, 0)
#define report_error(val) \
print_later("Unhandled USB event at usb.c line %d: 0x%x", \
__LINE__, val, 0, 0, 0)
#else /* Not debugging */
#define print_later(...)
/* TODO: Something unexpected happened. Figure out how to report & fix it. */
#define report_error(dummy) \
CPRINTS("Unhandled USB error at %s line %d: 0x%x", \
__FILE__, __LINE__, dummy)
#define report_error(val) \
CPRINTS("Unhandled USB event at %s line %d: 0x%x", \
__FILE__, __LINE__, val)
#endif /* DEBUG_ME */