Files
OpenCellular/util
Shawn Nematbakhsh 911da8c150 ectool: Always try v0 of GET_VERSIONS command if v1 fails
The ioctl return status for CROS_EC_DEV_IOCXCMD is inconsistent across
kernel versions:

- In 3.8 kernel, on INVALID_VERSION EC result, -EBADMSG is returned
- In 3.14 kernel, on INVALID_VERSION EC result, success status is
  returned

In both cases, the INVALID_VERSION result is written to the
cros_ec_command.result parameter.

The inconsistency here should be fixed with kernel patches. In any case,
there is little harm with trying v0 of GET_VERSIONS on any failure of the v1
command.

BUG=chrome-os-partner:37668,chromium:466896
TEST=Manual on peppy. Verify 'ectool thermalget 0 0' prints threshold info.
BRANCH=None

Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: Ic1eb3f8f2fa95711ec15a5afb740af8f18b88b55
Reviewed-on: https://chromium-review.googlesource.com/260004
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Commit-Queue: Bill Richardson <wfrichar@chromium.org>
Trybot-Ready: Bill Richardson <wfrichar@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2015-03-14 00:45:41 +00:00
..
2013-12-19 00:12:28 +00:00
2013-07-01 16:14:16 -07:00
2012-11-01 14:09:34 -07:00
2015-03-12 03:42:12 +00:00
2014-10-07 03:37:48 +00:00
2014-02-17 17:35:43 +00:00
2013-07-01 16:14:16 -07:00
2014-01-15 04:52:54 +00:00