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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Dec 2018 08:16:09 +0000 (09:16 +0100)
commitcd7b7f509cd05dfda2a47df49a35fe40615e2be1
tree32ef20cfcc8789d43f10907fb738dce7e4c23bcd
parent35eaa0ee4e69cc17166e10c0c17506d050a3e60d
media: cec: check for non-OK/NACK conditions while claiming a LA

[ Upstream commit 55623b4169056d7bb493d1c6f715991f8db67302 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/cec/cec-adap.c