[media] media: solo6x10: fix lockup by avoiding delayed register write
authorAndrey Utkin <andrey.utkin@corp.bluecherry.net>
Sat, 22 Oct 2016 15:34:36 +0000 (13:34 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 16 Nov 2016 15:23:04 +0000 (13:23 -0200)
commit5fc4b067ec082c3127e0156f800769b7e0dce078
tree41af06e7b17c61f14a93e901b30d33a3345dfdd8
parent84512f3e1c5439dbd79f82ef6b24294a6c3e53a3
[media] media: solo6x10: fix lockup by avoiding delayed register write

This fixes a lockup at device probing which happens on some solo6010
hardware samples. This is a regression introduced by commit e1ceb25a1569
("[media] SOLO6x10: remove unneeded register locking and barriers")

The observed lockup happens in solo_set_motion_threshold() called from
solo_motion_config().

This extra "flushing" is not fundamentally needed for every write, but
apparently the code in driver assumes such behaviour at last in some
places.

Actual fix was proposed by Hans Verkuil.

Fixes: e1ceb25a1569 ("[media] SOLO6x10: remove unneeded register locking and barriers")

Cc: stable@vger.kernel.org # 4.3 and up
Signed-off-by: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/pci/solo6x10/solo6x10.h