aboutsummaryrefslogtreecommitdiff
path: root/lib/test-string_helpers.c
diff options
context:
space:
mode:
authorHans Verkuil <[email protected]>2019-12-11 12:47:57 +0100
committerMauro Carvalho Chehab <[email protected]>2019-12-13 11:22:10 +0100
commitac479b51f3f4aaa852b5d3f00ecfb9290230cf64 (patch)
tree51ca6b6f919a60d0a4c75220a231b1af0b3108a0 /lib/test-string_helpers.c
parent95c29d46ab2a517e4c26d0a07300edca6768db17 (diff)
media: cec: check 'transmit_in_progress', not 'transmitting'
Currently wait_event_interruptible_timeout is called in cec_thread_func() when adap->transmitting is set. But if the adapter is unconfigured while transmitting, then adap->transmitting is set to NULL. But the hardware is still actually transmitting the message, and that's indicated by adap->transmit_in_progress and we should wait until that is finished or times out before transmitting new messages. As the original commit says: adap->transmitting is the userspace view, adap->transmit_in_progress reflects the hardware state. However, if adap->transmitting is NULL and adap->transmit_in_progress is true, then wait_event_interruptible is called (no timeout), which can get stuck indefinitely if the CEC driver is flaky and never marks the transmit-in-progress as 'done'. So test against transmit_in_progress when deciding whether to use the timeout variant or not, instead of testing against adap->transmitting. Signed-off-by: Hans Verkuil <[email protected]> Fixes: 32804fcb612b ("media: cec: keep track of outstanding transmits") Cc: <[email protected]> # for v4.19 and up Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'lib/test-string_helpers.c')
0 files changed, 0 insertions, 0 deletions