]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/5.0.4/media-lgdt330x-fix-lock-status-reporting.patch
Linux 5.0.4
[thirdparty/kernel/stable-queue.git] / releases / 5.0.4 / media-lgdt330x-fix-lock-status-reporting.patch
1 From 1b4fd9de6ec7f3722c2b3e08cc5ad171c11f93be Mon Sep 17 00:00:00 2001
2 From: "French, Nicholas A" <naf@ou.edu>
3 Date: Sun, 9 Dec 2018 02:11:18 -0500
4 Subject: media: lgdt330x: fix lock status reporting
5
6 From: French, Nicholas A <naf@ou.edu>
7
8 commit 1b4fd9de6ec7f3722c2b3e08cc5ad171c11f93be upstream.
9
10 A typo in code cleanup commit db9c1007bc07 ("media: lgdt330x: do
11 some cleanups at status logic") broke the FE_HAS_LOCK reporting
12 for 3303 chips by inadvertently modifying the register mask.
13
14 The broken lock status is critial as it prevents video capture
15 cards from reporting signal strength, scanning for channels,
16 and capturing video.
17
18 Fix regression by reverting mask change.
19
20 Cc: stable@vger.kernel.org # Kernel 4.17+
21 Fixes: db9c1007bc07 ("media: lgdt330x: do some cleanups at status logic")
22 Signed-off-by: Nick French <naf@ou.edu>
23 Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
24 Tested-by: Adam Stylinski <kungfujesus06@gmail.com>
25 Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
26 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
27
28 ---
29 drivers/media/dvb-frontends/lgdt330x.c | 2 +-
30 1 file changed, 1 insertion(+), 1 deletion(-)
31
32 --- a/drivers/media/dvb-frontends/lgdt330x.c
33 +++ b/drivers/media/dvb-frontends/lgdt330x.c
34 @@ -783,7 +783,7 @@ static int lgdt3303_read_status(struct d
35
36 if ((buf[0] & 0x02) == 0x00)
37 *status |= FE_HAS_SYNC;
38 - if ((buf[0] & 0xfd) == 0x01)
39 + if ((buf[0] & 0x01) == 0x01)
40 *status |= FE_HAS_VITERBI | FE_HAS_LOCK;
41 break;
42 default: