commit | 4066f05ebae55958e3d193f9177c310b1d480886 | [log] [tgz] |
---|---|---|
author | Daniel Fenner <dfenner@google.com> | Wed Oct 24 09:04:34 2018 |
committer | chrome-bot <chrome-bot@chromium.org> | Thu Oct 25 18:35:49 2018 |
tree | f8f5c025aaafb62a8eb703e7a1b554e8c01fbe2b | |
parent | 66abe03278f294247471311b7ea4c57b977bf12b [diff] |
Fix hanging firmware updater when device is unresponsive. Previously the updater unconditionally read from the device. In case of an unresponsive device this lead to a hanging process. Since the updater is triggered by udevd the event queue of udevd gets blocked which leads to followup problems - see the attached bug. Now we check for the availibility of data (using select) prior to starting to read. In case select runs into the one second timeout we print an error message and exit the updater. BUG=b:117422687 TEST=Deployed to local fizz box with one of the problematic devices attached. sis_fw_updater exits after a second and the syslog shows the error message. Change-Id: If7ce402c10edd172265c02a7684195f7e7d38d23 Reviewed-on: https://chromium-review.googlesource.com/1297490 Commit-Ready: Daniel Fenner <dfenner@google.com> Tested-by: Daniel Fenner <dfenner@google.com> Reviewed-by: Stefan Adolfsson <sadolfsson@chromium.org>
The code was proviced by SiS and modified by Google. Modifications include:
On Linux, should run as root.
At the root of the repository: make
.
Under Chrome OS development enviroment: emerge-${BOARD} sis-updater
.
Just run ./sis-updater
.