]> asedeno.scripts.mit.edu Git - linux.git/commit
media: tegra-cec: reset rx_buf_cnt when start bit detected
authorHans Verkuil <hverkuil@xs4all.nl>
Wed, 28 Feb 2018 10:47:07 +0000 (05:47 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 5 Mar 2018 12:46:24 +0000 (07:46 -0500)
commite113d65ae417ae6d9be229649b81d404c47ade79
tree083542d4725624c3a7a0c5a5af4cef508a631368
parent2fe4c22c53fc2e3f35be2cd0033cb3d15ebd41b1
media: tegra-cec: reset rx_buf_cnt when start bit detected

If a start bit is detected, then reset the receive buffer counter to 0.

This ensures that no stale data is in the buffer if a message is
broken off midstream due to e.g. a Low Drive condition and then
retransmitted.

The only Rx interrupts we need to listen to are RX_REGISTER_FULL (i.e.
a valid byte was received) and RX_START_BIT_DETECTED (i.e. a new
message starts and we need to reset the counter).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: <stable@vger.kernel.org> # for v4.15 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/tegra-cec/tegra_cec.c