public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tuner-xc2028: More firmware loading retries
@ 2011-01-23 16:16 Alina Friedrichsen
  0 siblings, 0 replies; only message in thread
From: Alina Friedrichsen @ 2011-01-23 16:16 UTC (permalink / raw)
  To: linux-media

My Hauppauge WinTV HVR-1400 needs sometimes more then only one retry to load the firmware successfully.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
---
diff -urNp linux-2.6.37.orig/drivers/media/common/tuners/tuner-xc2028.c linux-2.6.37/drivers/media/common/tuners/tuner-xc2028.c
--- linux-2.6.37.orig/drivers/media/common/tuners/tuner-xc2028.c	2011-01-22 23:46:57.936386804 +0100
+++ linux-2.6.37/drivers/media/common/tuners/tuner-xc2028.c	2011-01-23 13:59:05.402759222 +0100
@@ -685,7 +685,7 @@ static int check_firmware(struct dvb_fro
 {
 	struct xc2028_data         *priv = fe->tuner_priv;
 	struct firmware_properties new_fw;
-	int			   rc = 0, is_retry = 0;
+	int			   rc = 0, retry_count = 0;
 	u16			   version, hwmodel;
 	v4l2_std_id		   std0;
 
@@ -855,9 +855,9 @@ read_not_reliable:
 
 fail:
 	memset(&priv->cur_fw, 0, sizeof(priv->cur_fw));
-	if (!is_retry) {
+	if (retry_count < 8) {
 		msleep(50);
-		is_retry = 1;
+		retry_count++;
 		tuner_dbg("Retrying firmware load\n");
 		goto retry;
 	}


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-01-23 16:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-23 16:16 [PATCH] tuner-xc2028: More firmware loading retries Alina Friedrichsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox