Stefan Adolfsson 4e26caf25e npcx: CEC: Fix issues with pushing to incoming buffer
When pushing to the circular buffer, the read-offset mutex is no
longer taken, so don't unlock the mutex.

Don't allow writing to the last byte of the buffer. In that case,
the read and write pointers will become equal and the buffer will
be treated as empty.

Add handling for pushing messages of invalid size.

Signed-off-by: Stefan Adolfsson <sadolfsson@chromium.org>

BUG=b:76467407
BRANCH=none
TEST=Turn on/off TV:
ectool cec write 0x40 0x36
ectool cec write 0x04 0x40
Verify that incoming messages still works when turning off TV:
ectool cec read -- -1

Change-Id: Id207c442fac573430aac0c744ec07fa203074228
Reviewed-on: https://chromium-review.googlesource.com/1068945
Commit-Ready: Stefan Adolfsson <sadolfsson@chromium.org>
Tested-by: Stefan Adolfsson <sadolfsson@chromium.org>
Reviewed-by: Stefan Adolfsson <sadolfsson@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2018-05-22 15:54:06 -07:00
2018-05-22 15:54:06 -07:00
2017-08-07 19:29:13 -07:00
2018-05-21 18:19:29 -07:00
2017-07-08 20:38:53 -07:00
2017-10-10 22:13:43 -07:00
2018-05-21 21:18:04 -07:00
2018-05-02 22:20:48 -07:00
2012-05-11 09:11:52 -07:00
2018-05-14 12:28:05 -07:00
2018-05-14 12:28:05 -07:00
2014-04-02 19:58:53 +00:00
2018-05-02 22:21:09 -07:00
2017-11-16 21:07:40 -08:00

For an overview of the Embedded Controller firmware, refer to

http://www.chromium.org/chromium-os/2014-firmware-summit

For instructions on building from source, refer to

http://www.chromium.org/chromium-os/ec-development/getting-started-building-ec-images-quickly
Description
No description provided
Readme 1.4 GiB
Languages
C 64.7%
Lasso 20.7%
ASL 3.6%
JavaScript 3.2%
C# 2.9%
Other 4.6%