mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 02:35:28 +00:00
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>