Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp799513ybp; Fri, 4 Oct 2019 05:15:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqwsqLx3SSTa3mlDdw+Y0cWJvC+xtRjoRsbgUCnS+xEh18vYgfV2BF2E84Vk8EUwFZPcLD8X X-Received: by 2002:a50:eb93:: with SMTP id y19mr14750878edr.94.1570191328491; Fri, 04 Oct 2019 05:15:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570191328; cv=none; d=google.com; s=arc-20160816; b=Wz9l5pz2ZN5g2pB03cuoi8qXtXepb6Ph+BuASbyUnMVrrT0uEAF8PMoF/YnNUUxhlr /kqzAMIFdPSF78scuAUD8mG6j2pd3ZTID4jgEjc6IBaUe2ecyqaGufIhGdEYzwzztdug xr2TADiMPkXSMzpsaq9Tqy7zR/jHRB2KHxIXnCDg+zxJdY3ysoXFA4Ra8KtfFWdLFCPe n8aztPumaahaNyTdTt4qn3dRYVPtBuntKpwOynnBTUxdJRpw7lFJdLEUFRHRDl5pw3zC xEZ1Zs49Kfw8KQVO6Z19Yo7Nbf4kCjaMZLFb9P/AS+WUb4ft4IbClOfWm84iOBGGopFX F7Pw== 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=Qv8kGhW91Tax4P4e+bafmAL2gzBdpy9269d1P/vaNO8=; b=fz2NXcVMRCjmsEYxMN+9NMwwIy3fP5q1g4jEL0c+XjK68CCOhYd7LOu6KJF4xWOQw+ JYqeu1HflMgIbVPx0XqjVV4Jhm/PRcRc02UL5BUA0YJdVEntJGMFJdSQT5Gs6gQ1k59w TFJW5Z53N1NEcaZVqyCMA4qqJ9bc8cp21OjcmLA1MLV2nXsSeyyDkoCDZjqsEKqgBCSt 84RttTX17X5Oi5KE7Jt25dQvvNG5EEn02vGzwn2hwmAZQ8oGhQUXvC43NaIkRfIyCAYp odl+lzCS6SwE/UqYzEpFwrDsrjxKmpnrOGMaNZuUOmlyA+qnOq7F5M5WZhAyVprLMVqz 1QQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=eP+zYvje; 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 v17si2858831ejq.5.2019.10.04.05.15.03; Fri, 04 Oct 2019 05:15:28 -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=eP+zYvje; 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 S1730916AbfJDMJF (ORCPT + 99 others); Fri, 4 Oct 2019 08:09:05 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:54112 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729189AbfJDMJF (ORCPT ); Fri, 4 Oct 2019 08:09:05 -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=Qv8kGhW91Tax4P4e+bafmAL2gzBdpy9269d1P/vaNO8=; b=eP+zYvje3k8HF64RmwOEKGW9F LIIn7DE8YtLWjFpFcXSkSqrgmkJl2KBlNWeZtDm4SBlmOiK+K8IdbJsPq+QIHwZEN2Hp1irBMVTaq /eN14/263q86D9TOFe56L1tIZ5e97p1gf5vRhq9FhY8nPP7HVvxi0x3G/H5lYhizkiUvNfKO1g0di oAxF4CpJZqebs5TVWo1GML9Bc0jNBTINU0hE7WeJ+Jwo0F27LvOnifSSakzvOuCr7c10QYBsM/lKw q39WnSGSJ00XwUvfnpqPTTnYSejelMMIApBkTKavEXUT27SVjWQDn5vjweFvDGAcuOAjQ5fSHzeUA gWXlZumRQ==; 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 1iGMOJ-0006iY-9q; Fri, 04 Oct 2019 12:08:59 +0000 Date: Fri, 4 Oct 2019 09:08:55 -0300 From: Mauro Carvalho Chehab To: JP Cc: Gonsolo , crope@iki.fi, Sean Young , linux-media@vger.kernel.org, Linux Kernel Subject: Re: [PATCH] si2157: Add support for Logilink VG0022A. Message-ID: <20191004090855.14e418ed@coco.lan> In-Reply-To: <23d9856c-cc12-7212-9126-90d80f67abfb@jpvw.nl> References: <29ab2e43-4374-a3ea-6ae1-a4267867eaa4@jpvw.nl> <20191002154922.7f1cfc76@coco.lan> <20191003080539.2b13c03b@coco.lan> <20191003120238.75811da6@coco.lan> <20191003160336.GA5125@Limone> <20191003130909.01d29b77@coco.lan> <20191003162326.GA2727@Limone> <20191003144225.0137bf6c@coco.lan> <20191003183200.GA2631@Limone> <20191003163914.7c384d36@coco.lan> <20191003164426.6da8538f@coco.lan> <20191003170329.3624f7f2@coco.lan> <23d9856c-cc12-7212-9126-90d80f67abfb@jpvw.nl> 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 Fri, 4 Oct 2019 13:50:43 +0200 JP escreveu: > On 10/3/19 10:03 PM, Mauro Carvalho Chehab wrote: > > Em Thu, 3 Oct 2019 21:51:35 +0200 > > Gonsolo escreveu: > > > >>> 1) The firmware file is likely at the Windows driver for this device > >>> (probably using a different format). It should be possible to get > >>> it from there. > >> If you tell me how I'm willing to do this. :) > > I don't know. I was not the one that extracted the firmware. I guess > > Antti did it. > > > > I suspect that there are some comments about that in the past at the > > ML. seek at lore.kernel.org. > > > >>> 2) Another possibility would be to add a way to tell the si2168 driver > >>> to not try to load a firmware, using the original one. That would > >>> require adding a field at si2168_config to allow signalizing to it > >>> that it should not try to load a firmware file, and add a quirk at > >>> the af9035 that would set such flag for Logilink VG0022A. > >> I don't get this. Which firmware, si2168 or si2157? > > The one that it is causing the problem. If I understood well, the > > culprit was the si2168 firmware. > > > >> I'm still for option 3: If there is a bogus chip revision number it's > >> likely the VG0022A and we can safely set fw to NULL, in which case > >> everything works. > >> All already working devices will continue to work as before. > >> With a low probability there are other devices that will return 0xffff > >> but a) they didn't work until now and b) they receive a clear message > >> that they return bogus numbers and this works just for the VG0022A, in > >> which case this hardware can be tested. > >> At last, *my* VG0022A will work without a custom kernel which I'm a > >> big fan of. :)) > >> > >> Are there any counterarguments except that it is not the cleanest > >> solution in the universe? ;) > > That's a really bad solution. Returning 0xff is what happens when > > things go wrong during I2C transfers. Several problems can cause it, > > including device misfunction. Every time someone comes with a patch > > trying to ignore it, things go sideways for other devices (existing > > or future ones). > > > > Ignoring errors is always a bad idea. > add module param say 'gonso_hack_vg0022a' > if true, act on error by setting a flag > if this flag is set don't load firmware Adding a module param should be the last resort, only when there's no way for the driver to autodetect. Making af9035 to detect vg0022a is quite simple. Considering this device's entry: { DVB_USB_DEVICE(USB_VID_DEXATEK, 0x0100, &it930x_props, "Logilink VG0022A", NULL) }, the check, at af9035 would be: if (le16_to_cpu(d->udev->descriptor.idVendor) == USB_VID_DEXATEK && le16_to_cpu(d->udev->descriptor.idProduct) == 0x0100) /* do something to disable firmware load */ So, no need to add any load time parameter. It should be noticed that a change just at af9035 won't work, as the firmware is updated by si2168 driver. So, the caller code needs to pass a config parameter to si2168 driver. Thanks, Mauro