summaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2018-10-05 08:00:21 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-13 11:08:53 -0800
commitb68d405a2e6a3e8236773b12739ef684fb43d0e9 (patch)
treea12c42bae0bbf29a6e2bc1b9e97ab3cfdcdc4c66 /include/media
parent94ec4487af9f08d10270bd2ad5d6802a2a42d74f (diff)
media: cec: fix the Signal Free Time calculation
commit 7d867a1b765e2b70815fec4964d7822a976ed349 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/cec.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/media/cec.h b/include/media/cec.h
index 603f2fa08f62..9b7394a74dca 100644
--- a/include/media/cec.h
+++ b/include/media/cec.h
@@ -63,7 +63,6 @@ struct cec_data {
struct delayed_work work;
struct completion c;
u8 attempts;
- bool new_initiator;
bool blocking;
bool completed;
};
@@ -174,6 +173,7 @@ struct cec_adapter {
bool is_configuring;
bool is_configured;
bool cec_pin_is_high;
+ u8 last_initiator;
u32 monitor_all_cnt;
u32 monitor_pin_cnt;
u32 follower_cnt;