diff options
author | Parth Malkan <parthmalkan@google.com> | 2022-08-04 17:45:28 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-08-05 19:08:57 +0000 |
commit | 4cd022b82dd64a5fd85cfccca5f5d0a72761b95c (patch) | |
tree | 8faddd3db6046d4900367711c06b6258ea723a46 | |
parent | a639c13eca2e4c1982e8b7d699a8b387e6bb030d (diff) | |
download | chrome-ec-4cd022b82dd64a5fd85cfccca5f5d0a72761b95c.tar.gz |
usbhc: Initialize usbhc state variable to READY_TO_RX
usbhc state gets initialized to Disabled, it should be initialized to
READY_TO_RX, this patch fixes that.
BUG=b:239103306
TEST=Tested manually on Vell with RGB and KB BL host commands after
device wakes up from suspend
BRANCH=None
Signed-off-by: Parth Malkan <parthmalkan@google.com>
Change-Id: I154667a4300bf513f320742cec881ae59985828e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3812504
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
-rw-r--r-- | common/usb_host_command.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/common/usb_host_command.c b/common/usb_host_command.c index 697885a1f7..8bb00147c3 100644 --- a/common/usb_host_command.c +++ b/common/usb_host_command.c @@ -20,10 +20,8 @@ #define CPRINTS(format, args...) cprints(CC_HOSTCMD, "USBHC: " format, ##args) enum usbhc_state { - /* Not enabled (initial state, and when chipset is off) */ - USBHC_STATE_DISABLED = 0, - /* Ready to receive next request */ - USBHC_STATE_READY_TO_RX, + /* Initial State - Ready to receive next request */ + USBHC_STATE_READY_TO_RX = 0, /* Receiving request */ USBHC_STATE_RECEIVING, /* Processing request */ @@ -202,7 +200,6 @@ static void usbhc_written(struct consumer const *consumer, size_t count) return; case USBHC_STATE_PROCESSING: case USBHC_STATE_SENDING: - case USBHC_STATE_DISABLED: /* * Take no action and return though we may have resource to * receive a new request. Host will get a buffer full error or |