Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp450559ybn; Thu, 3 Oct 2019 07:25:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqwmYarKTJHYjJLChXbbMN/ddmtU0P/RKtinqWKbpihiJxd9y3JVHzx8n3L5kNjrRjGue2rw X-Received: by 2002:a05:6402:7c1:: with SMTP id u1mr9872247edy.198.1570112713219; Thu, 03 Oct 2019 07:25:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570112713; cv=none; d=google.com; s=arc-20160816; b=LwkJZ2hDpnjrUcoWBytTu3FU/bNzjUPzDyY0LD6enpCTiB8TFFtlEAkxlHdmFZzyly fMKDDDLYVk8VFHmAj+25YeC2PuW/jn4cBNHV/KswiYjoetLqVhUpFdy20eCA1+Ine5Le C6RzXgG69Og2we4FDr+CAQt0Ch2uTL9zMTCdpHAv7iKQngdYzYlilzXkNBOUdLEik58W Bwz3wbmrfSy2uqTZaWDOsoTuCYLQTaKnzwrMenH2VO4oyv0IRdPMc7KTWq9worOPGdAP Uo7854phqpYCa1qe01GobwPIJJLl9cJeyLV6+Erp72QIH3OVg+LDY/jbX3BmX67hoB8C b4qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=hSjVhr+TxHikgyvVbjZ6N9WzrVnc0qlIQP9JM8TUOps=; b=MuXuUx3DfzrJKHN2UqJoWkv2UlRXcKaHxUfMJVJNJ7kYzaCkpvOIVmjpnzeI+p7X5/ Njqj4/MZcDN1YaTWv1kWcl1dFyCIJe+w1Ii4FDk908lnLjWw1Dqy3UtMZkdJ1M+ZoU9M n469ycOUoSjtg1ymn1Slzq3lbaKBypXNjnF1aFrC/iPs0nYJmXxhTFo956eJGK7LGKgj 7Nc/q5Zw8Gyg3uZ58D7z+Iv0ZLClIJSGk/kQKFTi21iesL60Zc99/u9oR3hwNERcFP35 TlEB2/VMm4fB5yrxEl0cNlbLuxzux01Ze6RJCPMZnvf2erXtLFR1tksGKp/tDr8jXitx CHUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Z4Erw6du; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r24si1320637ejs.166.2019.10.03.07.24.47; Thu, 03 Oct 2019 07:25:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Z4Erw6du; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730131AbfJCMwo (ORCPT + 99 others); Thu, 3 Oct 2019 08:52:44 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:38174 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729086AbfJCMwo (ORCPT ); Thu, 3 Oct 2019 08:52:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=hSjVhr+TxHikgyvVbjZ6N9WzrVnc0qlIQP9JM8TUOps=; b=Z4Erw6duU0bxU9l15Y+cHI0xm iUBtS1mYOo8p7c97FykF8iobjrrFUOmWWHOg09tmzXGhjTwojC5dz8isxflrdmyV3PK/tE0eSrTxY wPzBjFL8hHNVA5EScf15Ic47XhawwTfd7E97CvaHfXYJWG9XyKHf1c35tHIiw7/kKbLYs8q4aZy+Y GJC2HySTMuik/BMed6Q9eIBbw3sUE9iaviFrDKgTfZvoyO7wXiS4NLQxchwuA4Rh5AdzW31UqDxrM vTAFbXO12vW7GULUQ7Fs1VvXoBbaHnFssdm4enfPW59lQLQxGoeNcXhd4VcIA7BbEU/9g1it1W8dd P7jcOLbYA==; Received: from 177.133.68.49.dynamic.adsl.gvt.net.br ([177.133.68.49] helo=coco.lan) by bombadil.infradead.org with esmtpsa (Exim 4.92.2 #3 (Red Hat Linux)) id 1iG0b3-00055F-H8; Thu, 03 Oct 2019 12:52:41 +0000 Date: Thu, 3 Oct 2019 09:52:37 -0300 From: Mauro Carvalho Chehab To: Gonsolo Cc: JP , crope@iki.fi, Sean Young , linux-media@vger.kernel.org, Linux Kernel Subject: Re: [PATCH] si2157: Add support for Logilink VG0022A. Message-ID: <20191003095237.2efa0e7f@coco.lan> In-Reply-To: <20191003094904.3aa5fdc7@coco.lan> References: <20191001205203.4b1a5fb6@coco.lan> <20191002141359.30166-1-gonsolo@gmail.com> <20191002141359.30166-2-gonsolo@gmail.com> <20191002142744.GA3475@gofer.mess.org> <20191002150650.GA4227@gofer.mess.org> <29ab2e43-4374-a3ea-6ae1-a4267867eaa4@jpvw.nl> <20191002154922.7f1cfc76@coco.lan> <20191003081742.0933264b@coco.lan> <20191003094904.3aa5fdc7@coco.lan> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, 3 Oct 2019 09:49:04 -0300 Mauro Carvalho Chehab escreveu: > Em Thu, 3 Oct 2019 13:41:23 +0200 > Gonsolo escreveu: > > > Hi! > > > > > It means that there's a firmware stored at the device's eeprom > > > (version 4.0.2). When the driver starts, it downloads a newer firmware > > > from the file dvb-demod-si2168-b40-01.fw. > > > > Thanks for the explanation. > > > > > Btw, could you please try the enclosed hack and post the results? > > > > Will do in a second. > > > > FWIW, this hack worked: > > > > diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c > > index e87040d6eca7..28a3a4f1640e 100644 > > --- a/drivers/media/tuners/si2157.c > > +++ b/drivers/media/tuners/si2157.c > > @@ -136,6 +136,7 @@ static int si2157_init(struct dvb_frontend *fe) > > #define SI2147_A30 ('A' << 24 | 47 << 16 | '3' << 8 | '0' << 0) > > #define SI2146_A10 ('A' << 24 | 46 << 16 | '1' << 8 | '0' << 0) > > #define SI2141_A10 ('A' << 24 | 41 << 16 | '1' << 8 | '0' << 0) > > + #define GONZO (255 << 24 | 255 << 16 | 255 << 8 | 255 << 0) > > > > switch (chip_id) { > > case SI2158_A20: > > @@ -148,6 +149,10 @@ static int si2157_init(struct dvb_frontend *fe) > > case SI2177_A30: > > fw_name = SI2157_A30_FIRMWARE; > > break; > > + case GONZO: > > + dev_info(&client->dev, "trying null\n"); > > + fw_name = NULL; > > + break; > > case SI2157_A30: > > case SI2147_A30: > > case SI2146_A10: > > What does it print with this hack? > > Also, could you get the SI version after the reset code at > skip_fw_download, just after retrieving si2157 firmware version? Maybe something like this would make it work? diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c index e87040d6eca7..86d945fd50b9 100644 --- a/drivers/media/tuners/si2157.c +++ b/drivers/media/tuners/si2157.c @@ -129,6 +129,28 @@ static int si2157_init(struct dvb_frontend *fe) chip_id = cmd.args[1] << 24 | cmd.args[2] << 16 | cmd.args[3] << 8 | cmd.args[4] << 0; + if (chip_id == 0xffffffff) { + /* reboot the tuner */ + memcpy(cmd.args, "\x01\x01", 2); + cmd.wlen = 2; + cmd.rlen = 1; + ret = si2157_cmd_execute(client, &cmd); + if (ret) + goto err; + + /* query chip revision */ + memcpy(cmd.args, "\x02", 1); + cmd.wlen = 1; + cmd.rlen = 13; + ret = si2157_cmd_execute(client, &cmd); + if (ret) + goto err; + + chip_id = cmd.args[1] << 24 | cmd.args[2] << 16 | cmd.args[3] << 8 | + cmd.args[4] << 0; + + } + #define SI2177_A30 ('A' << 24 | 77 << 16 | '3' << 8 | '0' << 0) #define SI2158_A20 ('A' << 24 | 58 << 16 | '2' << 8 | '0' << 0) #define SI2148_A20 ('A' << 24 | 48 << 16 | '2' << 8 | '0' << 0) Thanks, Mauro