OSDN Git Service

media: cec: check for non-OK/NACK conditions while claiming a LA
authorHans Verkuil <hverkuil@xs4all.nl>
Wed, 10 Oct 2018 11:12:15 +0000 (07:12 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 6 Nov 2018 10:22:42 +0000 (05:22 -0500)
commit55623b4169056d7bb493d1c6f715991f8db67302
treea2635f64987c20f8b5c3c49a63709b11e20e2050
parent7cf7b2e977abf3f992036939e35a8eab60013aff
media: cec: check for non-OK/NACK conditions while claiming a LA

During the configuration phase of a CEC adapter it is trying to claim a
free logical address by polling.

However, the code doesn't check if there were errors other than OK or NACK,
those are just treated as if the poll was NACKed.

Instead check for such errors and retry the poll. And if the problem persists
then don't claim this LA since there is something weird going on.

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