media: cec: correctly pass on reply results
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Sat, 13 Nov 2021 11:02:36 +0000 (11:02 +0000)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sun, 24 Apr 2022 06:39:43 +0000 (07:39 +0100)
commitf9d0ecbf56f4b90745a6adc5b59281ad8f70ab54
treeb2db8b50fb7ac31c310a2c6df0124f78350b0707
parent590a8e564c6eff7e77a84e728612f1269e3c0685
media: cec: correctly pass on reply results

The results of non-blocking transmits were not correctly communicated
to userspace.

Specifically:

1) if a non-blocking transmit was canceled, then rx_status wasn't set to 0
   as it should.
2) if the non-blocking transmit succeeded, but the corresponding reply
   never arrived (aborted or timed out), then tx_status wasn't set to 0
   as it should, and rx_status was hardcoded to ABORTED instead of the
   actual reason, such as TIMEOUT. In addition, adap->ops->received() was
   never called, so drivers that want to do message processing themselves
   would not be informed of the failed reply.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/cec/core/cec-adap.c