summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2017-03-31 15:20:24 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-04-03 19:09:26 -0700
commite69a10388476c963c52d99967d15362a5ce44064 (patch)
tree2dd08c875833cf6b7874dde977e9bcaad4303973
parentdf0c0b2b33df8a3594ec7c6503f9577d8bc578c4 (diff)
downloadchrome-ec-stabilize-9430.B.tar.gz
usb_updater: fix --fwverstabilize-9430.B
This change adds a send_done call at the end of show_fw_ver. With this change Cr50 will set the state to rx_idle after every usb_update -f call. Cr50 cannot process any vendor commands unless the updater state is idle. After a vendor command is sent cr50 wont set the state to idle unless it receives a send_done call. It will also reset the state if it sees that it has been more than 5 seconds since the last transfer. In the current state you cannot use usb_updater -f back to back because usb_updater doesn't call send_done through the -f path. If you wait 5 seconds between calls, then it will work. If the call fails and you keep retrying waiting less than 5 seconds between calls, then it will fail forever. The last transfer time will get reset with each call and Cr50 will never reach the timeout to reset the usb_update state to idle. BUG=none BRANCH=cr50 TEST=run 'sudo ./usb_updater -f && sudo ./usb_updater -f'. Verify both calls succeed. Change-Id: I5daca8e03ece840288abb61e02a528a9af0ada30 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/465491 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r--extra/usb_updater/usb_updater.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/extra/usb_updater/usb_updater.c b/extra/usb_updater/usb_updater.c
index dda202690d..6318d340e2 100644
--- a/extra/usb_updater/usb_updater.c
+++ b/extra/usb_updater/usb_updater.c
@@ -1254,6 +1254,7 @@ int main(int argc, char *argv[])
targ.shv[0].minor);
printf("RW %d.%d.%d\n", targ.shv[1].epoch, targ.shv[1].major,
targ.shv[1].minor);
+ send_done(&td.uep);
}
if (data) {