[media] cafe_ccic: Fix hang in command write processing
authorDaniel Drake <dsd@laptop.org>
Fri, 24 Sep 2010 17:17:17 +0000 (14:17 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 21 Oct 2010 03:17:04 +0000 (01:17 -0200)
commitdf2b9b0f9c02689ce3b3f0b5dbc6c9b272bbe1ab
treecb36b0bd7fde50dd3042bfe38d58a118790dc69d
parenta716e9d75f04ff71fb5e391a7a189b6f1b032bbc
[media] cafe_ccic: Fix hang in command write processing

This patch, which basically reverts 6d77444ac, fixes an occasional
on-boot or on-capture hang on the XO-1 laptop.

It seems like the cafe hardware is flakier than we thought and that in
some cases, the commands get executed but are never reported as completed
(even if we substantially increase the delays before reading registers).

Reintroduce the 1-second CAFE_SMBUS_TIMEOUT to catch and avoid this
strange hardware bug.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cafe_ccic.c