Skip to contentSkip to conversation

media: dvb-frontends: Add delay to Si2168 restart

PATCH Superseded Ron Economos 2 participants 3 messages Oct 11, 2017 – Dec 12, 2017

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

PATCH 1/1 media: dvb-frontends: Add delay to Si2168 restart

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.

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

  */

 #include "si2168_priv.h"
+#include <linux/delay.h>

 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;

#1 lore raw

Em Tue, 10 Oct 2017 18:13:30 -0700
Ron Economos <[email protected]> escreveu:

Quoted 3 lines

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.

You forgot to add your signed-off-by after the patch description.

That's required for all patches that will be applied. See:
https://linuxtv.org/wiki/index.php/Development:_Submitting_Patches#Sign_your_work

Quoted 15 lines
drivers/media/dvb-frontends/si2168.c +1 -0
index 172fc36..f2a3c8f 100644
@@ -15,6 +15,7 @@
   */
 
  #include "si2168_priv.h"
+#include <linux/delay.h>
 
  static const struct dvb_frontend_ops si2168_ops;
 

drivers/media/dvb-frontends/si2168.c static int si2168_init(struct dvb_frontend *fe) · line 439

Quoted 4 lines
drivers/media/dvb-frontends/si2168.c +1 -0
@@ -435,6 +436,7 @@ static int si2168_init(struct dvb_frontend *fe)
                 if (ret)
                         goto err;
 
+               udelay(100);

Your emailer is mangling your patches, replacing tabs by spaces and breaking long lines. Please either use git send-email or use some other email software, like claws-mail, pine or exim.

drivers/media/dvb-frontends/si2168.c static int si2168_init(struct dvb_frontend *fe) · line 442

Quoted 4 lines
drivers/media/dvb-frontends/si2168.c +0 -0
                 memcpy(cmd.args, "\x85", 1);
                 cmd.wlen = 1;
                 cmd.rlen = 1;

Thanks,
Mauro

#2 lore raw

PATCH RESEND 1/1 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.

---
 drivers/media/dvb-frontends/si2168.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/media/dvb-frontends/si2168.c +3 -0
index 41d9c51..539399d 100644
@@ -14,6 +14,8 @@
  *    GNU General Public License for more details.
  */
 
+#include <linux/delay.h>
+
 #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;
Signature · 1 line
2.7.4