From patchwork Sun Jan 23 16:16:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alina Friedrichsen X-Patchwork-Id: 499171 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0NGGEb4016246 for ; Sun, 23 Jan 2011 16:16:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751073Ab1AWQQM (ORCPT ); Sun, 23 Jan 2011 11:16:12 -0500 Received: from mailout-de.gmx.net ([213.165.64.22]:48044 "HELO mailout-de.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1750983Ab1AWQQM (ORCPT ); Sun, 23 Jan 2011 11:16:12 -0500 Received: (qmail 12711 invoked by uid 0); 23 Jan 2011 16:16:10 -0000 Received: from 217.140.74.86 by www005.gmx.net with HTTP; Sun, 23 Jan 2011 17:16:07 +0100 (CET) Date: Sun, 23 Jan 2011 17:16:07 +0100 From: "Alina Friedrichsen" Message-ID: <20110123161607.25900@gmx.net> MIME-Version: 1.0 Subject: [PATCH] tuner-xc2028: More firmware loading retries To: linux-media@vger.kernel.org X-Authenticated: #24363424 X-Flags: 0001 X-Mailer: WWW-Mail 6100 (Global Message Exchange) X-Priority: 3 X-Provags-ID: V01U2FsdGVkX18673wkEuI6Nx2n72PtInXBDbKTa+nyz9ad0pBed9 1nbRF3qKZIEbF23JQ+X78H26FEnjasEoIOmw== X-GMX-UID: f2YPeXRDX1V6dpSsH2Bywq1/SDc4NMwz Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sun, 23 Jan 2011 16:16:14 +0000 (UTC) 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; }