diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2022-05-06 09:39:22 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-05-13 11:28:35 +0200 |
commit | 184c387db057c135eeab1a163f863838edb02483 (patch) | |
tree | 679a9658fef3a1a3b722c475f4475983dec8780a /drivers/media/cec/core | |
parent | 498946cf6b85b5eafb142132a11351814f578535 (diff) | |
download | linux-184c387db057c135eeab1a163f863838edb02483.tar.gz linux-184c387db057c135eeab1a163f863838edb02483.tar.bz2 linux-184c387db057c135eeab1a163f863838edb02483.zip |
media: cec-adap.c: stop trying LAs on CEC_TX_STATUS_TIMEOUT
If, while trying to claim a free logical address, a POLL message
times out, then abort this process. A CEC_TX_STATUS_TIMEOUT
should be handled the same as a CEC_TX_STATUS_ABORTED.
This avoids a situation where transmits time out due to a
driver or hardware bug and it takes ages before the attempt
to find available free logical addresses finishes.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/cec/core')
-rw-r--r-- | drivers/media/cec/core/cec-adap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/cec/core/cec-adap.c b/drivers/media/cec/core/cec-adap.c index b47280fa3b87..004121e3582a 100644 --- a/drivers/media/cec/core/cec-adap.c +++ b/drivers/media/cec/core/cec-adap.c @@ -1282,10 +1282,11 @@ static int cec_config_log_addr(struct cec_adapter *adap, return err; /* - * The message was aborted due to a disconnect or + * The message was aborted or timed out due to a disconnect or * unconfigure, just bail out. */ - if (msg.tx_status & CEC_TX_STATUS_ABORTED) + if (msg.tx_status & + (CEC_TX_STATUS_ABORTED | CEC_TX_STATUS_TIMEOUT)) return -EINTR; if (msg.tx_status & CEC_TX_STATUS_OK) return 0; |