Re: [PATCH] Fix for hanging si2168 in PCTV 292e, making code match

2018-03-07 Thread Ron Economos
I'm almost 100% sure that the patch I submitted (and was committed in 
Linux 4.16-rc1) for the si2168 fixes Nigel's issue. I would suggest that 
Nigel's patch be retired.


https://github.com/torvalds/linux/blob/master/drivers/media/dvb-frontends/si2168.c

media: [RESEND] media: dvb-frontends: Add delay to Si2168 restart

On faster CPUs a delay is required after the resume command and the 
restart command. Without the delay, the restart command often returns 
-EREMOTEIO and the Si2168 does not restart. Note that this patch fixes 
the same issue as https://patchwork.linuxtv.org/patch/44304/, but I 
believe my udelay() fix addresses the actual problem.


Signed-off-by: Ron Economos <w...@comcast.net>
Signed-off-by: Mauro Carvalho Chehab <mche...@s-opensource.com>

Ron



[PATCH RESEND] media: dvb-frontends: Add delay to Si2168 restart.

2017-12-11 Thread Ron Economos
On faster CPUs a delay is required after the resume command and the restart 
command. Without the delay, the restart command often returns -EREMOTEIO and 
the Si2168 does not restart.

Note that this patch fixes the same issue as 
https://patchwork.linuxtv.org/patch/44304/, but I believe my udelay() fix 
addresses the actual problem.

Signed-off-by: Ron Economos <w...@comcast.net>

---
 drivers/media/dvb-frontends/si2168.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/dvb-frontends/si2168.c 
b/drivers/media/dvb-frontends/si2168.c
index 41d9c51..539399d 100644
--- a/drivers/media/dvb-frontends/si2168.c
+++ b/drivers/media/dvb-frontends/si2168.c
@@ -14,6 +14,8 @@
  *GNU General Public License for more details.
  */
 
+#include 
+
 #include "si2168_priv.h"
 
 static const struct dvb_frontend_ops si2168_ops;
@@ -435,6 +437,7 @@ static int si2168_init(struct dvb_frontend *fe)
if (ret)
goto err;
 
+   udelay(100);
memcpy(cmd.args, "\x85", 1);
cmd.wlen = 1;
cmd.rlen = 1;
-- 
2.7.4



[PATCH]media: dvb-frontends: Add delay to Si2168 restart

2017-10-10 Thread Ron Economos
On faster CPUs a delay is required after the POWER_UP/RESUME command and 
the DD_RESTART command. Without the delay, the DD_RESTART command often 
returns -EREMOTEIO and the Si2168 does not restart.


diff --git a/drivers/media/dvb-frontends/si2168.c 
b/drivers/media/dvb-frontends/si2168.c

index 172fc36..f2a3c8f 100644
--- a/drivers/media/dvb-frontends/si2168.c
+++ b/drivers/media/dvb-frontends/si2168.c
@@ -15,6 +15,7 @@
  */

 #include "si2168_priv.h"
+#include 

 static const struct dvb_frontend_ops si2168_ops;

@@ -435,6 +436,7 @@ static int si2168_init(struct dvb_frontend *fe)
    if (ret)
    goto err;

+   udelay(100);
    memcpy(cmd.args, "\x85", 1);
    cmd.wlen = 1;
    cmd.rlen = 1;



{PATCH] media: dvb-core: Crash from uninitialized pointer

2017-10-10 Thread Ron Economos
In the function dvb_net_ule(), the pointer h.priv is not initialized. 
When a ULE packet is received, the kernel crashes.


diff --git a/drivers/media/dvb-core/dvb_net.c 
b/drivers/media/dvb-core/dvb_net.c

index 06b0dcc..abfa3e5 100644
--- a/drivers/media/dvb-core/dvb_net.c
+++ b/drivers/media/dvb-core/dvb_net.c
@@ -798,6 +798,7 @@ static void dvb_net_ule(struct net_device *dev, 
const u8 *buf, size_t buf_len)

 * For all TS cells in current buffer.
 * Appearently, we are called for every single TS cell.
 */
+   h.priv = netdev_priv(dev);
    for (h.ts = h.buf, h.ts_end = h.buf + h.buf_len;
 h.ts < h.ts_end; /* no incr. */) {
    if (h.new_ts) {