]> git.baikalelectronics.ru Git - kernel.git/commit
media: cec: fix the Signal Free Time calculation
authorHans Verkuil <hans.verkuil@cisco.com>
Fri, 5 Oct 2018 12:00:21 +0000 (08:00 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 5 Oct 2018 15:27:15 +0000 (11:27 -0400)
commitd7ffb99cee41b6d8535d9167a90e34766635e9bb
tree64e009447bfda287b799b030e830616421b89b18
parent188c57ec06723cad3e0ba26db06f078cdb8f4069
media: cec: fix the Signal Free Time calculation

The calculation of the Signal Free Time in the framework was not
correct. If a message was received, then the next transmit should be
considered a New Initiator and use a shorter SFT value.

This was not done with the result that if both sides where continually
sending messages, they both could use the same SFT value and one side
could deny the other side access to the bus.

Note that this fix does not take the corner case into account where
a receive is in progress when you call adap_transmit.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: <stable@vger.kernel.org> # for v4.18 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/cec/cec-adap.c
include/media/cec.h