Skip to contentSkip to conversation

Fix for hanging si2168 in PCTV 292e, making the code match

PATCH In review Nigel Kettlewell 3 participants 4 messages Sep 19, 2017 – Mar 7, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix for hanging si2168 in PCTV 292e, making the code match

[re-sending as plain text]

Fix for hanging si2168 in PCTV 292e USB, making the code match the comment.

Using firmware v4.0.11 the 292e would work once and then hang on subsequent attempts to view DVB channels, until physically unplugged and plugged back in.

With this patch, the warm state is reset for v4.0.11 and it appears to work both on the first attempt and on subsequent attempts.

(Patch basis Linux 4.11.9 f82a53b87594f460f2dd9983eeb851a5840e8df8)

---
 drivers/media/dvb-frontends/si2168.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/dvb-frontends/si2168.c +1 -1
index 680ba06..523acd1 100644
@@ -582,7 +582,7 @@ static int si2168_sleep(struct dvb_frontend *fe)
        dev->active = false;
 
        /* Firmware B 4.0-11 or later loses warm state during sleep */
-       if (dev->version > ('B' << 24 | 4 << 16 | 0 << 8 | 11 << 0))
+       if (dev->version >= ('B' << 24 | 4 << 16 | 0 << 8 | 11 << 0))
                dev->warm = false;
 
        memcpy(cmd.args, "\x13", 1);

--
2.9.4

#1 lore raw

Em Tue, 19 Sep 2017 13:13:52 +0100
Nigel Kettlewell <[email protected]> escreveu:

Quoted 4 lines

[re-sending as plain text]

Fix for hanging si2168 in PCTV 292e USB, making the code match the comment.

Quoted 8 lines

Using firmware v4.0.11 the 292e would work once and then hang on subsequent attempts to view DVB channels, until physically unplugged and plugged back in.

With this patch, the warm state is reset for v4.0.11 and it appears to work both on the first attempt and on subsequent attempts.

(Patch basis Linux 4.11.9 f82a53b87594f460f2dd9983eeb851a5840e8df8)

Patch is missing a Signed-off-by. See:
https://elinux.org/Developer_Certificate_Of_Origin).

Quoted 20 lines
---
  drivers/media/dvb-frontends/si2168.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/dvb-frontends/si2168.c +1 -2
index 680ba06..523acd1 100644
@@ -582,7 +582,7 @@ static int si2168_sleep(struct dvb_frontend *fe)
         dev->active = false;
 
         /* Firmware B 4.0-11 or later loses warm state during sleep */
-       if (dev->version > ('B' << 24 | 4 << 16 | 0 << 8 | 11 << 0))
+       if (dev->version >= ('B' << 24 | 4 << 16 | 0 << 8 | 11 << 0))
                 dev->warm = false;
 
         memcpy(cmd.args, "\x13", 1);
--
Quoted 2 lines

2.9.4

Thanks,
Mauro

#2 lore raw
Quoted 13 lines · Mauro Carvalho Chehab

Em Tue, 19 Sep 2017 13:13:52 +0100
Nigel Kettlewell <[email protected]> escreveu:

Quoted 10 lines

[re-sending as plain text]

Fix for hanging si2168 in PCTV 292e USB, making the code match the comment.

Using firmware v4.0.11 the 292e would work once and then hang on subsequent attempts to view DVB channels, until physically unplugged and plugged back in.

With this patch, the warm state is reset for v4.0.11 and it appears to work both on the first attempt and on subsequent attempts.

It is comment which is wrong. With firmware 4.0.11 it works well without need of download it every time. But firmware 4.0.19 needs to be downloaded every time after device is put to sleep. Probably your issue is coming from some other reason.

Quoted 25 lines
Quoted 2 lines

(Patch basis Linux 4.11.9 f82a53b87594f460f2dd9983eeb851a5840e8df8)

Patch is missing a Signed-off-by. See:
https://elinux.org/Developer_Certificate_Of_Origin).

Quoted 18 lines
---
   drivers/media/dvb-frontends/si2168.c | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/dvb-frontends/si2168.c +1 -1
index 680ba06..523acd1 100644
@@ -582,7 +582,7 @@ static int si2168_sleep(struct dvb_frontend *fe)
          dev->active = false;
 
          /* Firmware B 4.0-11 or later loses warm state during sleep */
-       if (dev->version > ('B' << 24 | 4 << 16 | 0 << 8 | 11 << 0))
+       if (dev->version >= ('B' << 24 | 4 << 16 | 0 << 8 | 11 << 0))
                  dev->warm = false;
 
Quoted 10 lines
Quoted 4 lines
drivers/media/dvb-frontends/si2168.c +0 -1
          memcpy(cmd.args, "\x13", 1);
--

2.9.4

Thanks,
Mauro

regards
Antti

Signature · 1 line
http://palosaari.fi/
#3 lore raw

Em Wed, 7 Mar 2018 15:23:52 +0200
Antti Palosaari <[email protected]> escreveu:

Quoted 12 lines · Mauro Carvalho Chehab
Quoted 11 lines

Em Tue, 19 Sep 2017 13:13:52 +0100
Nigel Kettlewell <[email protected]> escreveu:

Quoted 8 lines

[re-sending as plain text]

Fix for hanging si2168 in PCTV 292e USB, making the code match the comment.

Using firmware v4.0.11 the 292e would work once and then hang on subsequent attempts to view DVB channels, until physically unplugged and plugged back in.

Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

With this patch, the warm state is reset for v4.0.11 and it appears to work both on the first attempt and on subsequent attempts.

It is comment which is wrong. With firmware 4.0.11 it works well without need of download it every time. But firmware 4.0.19 needs to be downloaded every time after device is put to sleep.

Ok. Let's then apply the enclosed patch (or something similar to it).

Quoted 1 line

Probably your issue is coming from some other reason.

I've no idea why Nigel proposed this patch. From my side, all I want is to update the status of this patch:

	https://patchwork.linuxtv.org/patch/44304/

and keep cleaning up my patch queue ;-)

Thanks,
Mauro

[PATCH] media: si2168: fix a comment about firmware version

There's a comment there at s82168 that it is wrong.

With firmware 4.0.11, sleep/resume works well without need of download it every time. But firmware 4.0.19 needs to be downloaded again after sleep.

drivers/media/dvb-frontends/si2168.c +1 -1
index a91947784842..324493e05f9f 100644
@@ -614,7 +614,7 @@ static int si2168_sleep(struct dvb_frontend *fe)
 	if (ret)
 		goto err;
 
-	/* Firmware B 4.0-11 or later loses warm state during sleep */
+	/* Firmware later than B 4.0-11 loses warm state during sleep */
 	if (dev->version > ('B' << 24 | 4 << 16 | 0 << 8 | 11 << 0))
 		dev->warm = false;