From patchwork Mon Jan 10 09:36:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver Endriss X-Patchwork-Id: 468101 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 p0A9dK5Y031201 for ; Mon, 10 Jan 2011 09:39:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753135Ab1AJJjL (ORCPT ); Mon, 10 Jan 2011 04:39:11 -0500 Received: from mailout-de.gmx.net ([213.165.64.22]:53917 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with SMTP id S1753075Ab1AJJjJ (ORCPT ); Mon, 10 Jan 2011 04:39:09 -0500 Received: (qmail invoked by alias); 10 Jan 2011 09:39:07 -0000 Received: from p5B30AF64.dip.t-dialin.net (HELO charon.escape-edv.de) [91.48.175.100] by mail.gmx.net (mp068) with SMTP; 10 Jan 2011 10:39:07 +0100 X-Authenticated: #476490 X-Provags-ID: V01U2FsdGVkX18YhBBWFi8YjFLdj+ytsEUFNKg6Kn9xQTKbtgSwTM ZmT4aG+HT0xDAF Received: from orion.escape-edv.de (192.168.1.10) by charon.escape-edv.de (192.168.1.9) with esmtp ; Mon, 10 Jan 2011 10:40:01 +0100 From: Oliver Endriss To: linux-media@vger.kernel.org Cc: mchehab@redhat.com Subject: [PATCH 03/16] ngene: Firmware 18 support Date: Mon, 10 Jan 2011 10:36:11 +0100 Message-Id: <1294652184-12843-4-git-send-email-o.endriss@gmx.de> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: <1294652184-12843-1-git-send-email-o.endriss@gmx.de> References: <1294652184-12843-1-git-send-email-o.endriss@gmx.de> X-Y-GMX-Trusted: 0 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]); Mon, 10 Jan 2011 09:39:21 +0000 (UTC) diff --git a/drivers/media/dvb/ngene/ngene-core.c b/drivers/media/dvb/ngene/ngene-core.c index 3a7ef71..e2546f1 100644 --- a/drivers/media/dvb/ngene/ngene-core.c +++ b/drivers/media/dvb/ngene/ngene-core.c @@ -1257,6 +1257,10 @@ static int ngene_load_firm(struct ngene *dev) fw_name = "ngene_17.fw"; dev->cmd_timeout_workaround = true; break; + case 18: + size = 0; + fw_name = "ngene_18.fw"; + break; } if (request_firmware(&fw, fw_name, &dev->pci_dev->dev) < 0) { @@ -1266,6 +1270,8 @@ static int ngene_load_firm(struct ngene *dev) ": Copy %s to your hotplug directory!\n", fw_name); return -1; } + if (size == 0) + size = fw->size; if (size != fw->size) { printk(KERN_ERR DEVICE_NAME ": Firmware %s has invalid size!", fw_name); @@ -1364,7 +1370,7 @@ static int ngene_start(struct ngene *dev) if (stat < 0) goto fail; - if (dev->card_info->fw_version == 17) { + if (dev->card_info->fw_version >= 17) { u8 tsin4_config[6] = { 3072 / 64, 3072 / 64, 0, 3072 / 64, 3072 / 64, 0}; u8 default_config[6] = { @@ -1373,7 +1379,7 @@ static int ngene_start(struct ngene *dev) if (dev->card_info->io_type[3] == NGENE_IO_TSIN) bconf = tsin4_config; - dprintk(KERN_DEBUG DEVICE_NAME ": FW 17 buffer config\n"); + dprintk(KERN_DEBUG DEVICE_NAME ": FW 17+ buffer config\n"); stat = ngene_command_config_free_buf(dev, bconf); } else { int bconf = BUFFER_CONFIG_4422;