Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3649956ybl; Mon, 3 Feb 2020 04:09:55 -0800 (PST) X-Google-Smtp-Source: APXvYqzbC260XCWTJzA2NPhhiOgB6QSm58HHojhLaT/tGkstRhtt/D251ZvXqr01lcWtCfAs9mzv X-Received: by 2002:a9d:6301:: with SMTP id q1mr6869491otk.299.1580731795153; Mon, 03 Feb 2020 04:09:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580731795; cv=none; d=google.com; s=arc-20160816; b=DoK+UD51HEStchYHksUoossPI9XozAQHWGUrfdOSreNbddulkDmYN+cnmlnGwDWtUT QOjbdPWFRRA3ritlqCHndG2n0EH7ydKKIpe+dWG0w5AzqqaKGjf1y+syQJDh4qQspI6p DtoWJt/BfsIHVMLQqZeMgmpo4Fwyhit7CztKYweYkYrr7YBQM54q9jSHaO3E50yca3YF PuxTlS849CbmbHko1vJv0GMdrHobNo11J+msy0Ixqs3rOLHrGnNBI0dC367kr4LJx3L2 oXjSoiw5q2R6MqDDtcq1ICD+mvcx/qGz6b587sJIZSDvC6gJOfo59eGTiB2ijrs+TRYe snJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=4vl9t6G+rR4BEVeLAiNKfNbHtFriLKQ5FIXsIeC8dtI=; b=tOLHJVYkuKc74Na1dDklveGfJ21qrQxSvarg++d3Cm6bdkUPYTbjkCjsHj3D0Ngy/I vMnrDB7zXf4jz0CYpqlfwAS0k0D5b0IWhJfEHivT+TQfBFVtEK8wtkiN39PncPM0CIJS Q/Xc9DDTG4h4/H31hU//pKwN/ssXGDppTEicmB1fPtA7bwRGzydlgH0/BL0Kyi0XcOM9 oqJ4jzAth+xFzzvcBL3w3okKC/jiDGhzISUbN6aUNO4WMzbm53nBVCrdCx8byR+myfWZ cTn2KBiFrnp4X/G+0GGjU8hEcMNQ4s5i+vWXByXGI5dQe0g7wNU4AzuNkui6NiO0Afw9 hWhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CJf3cu2h; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f89si9184215otf.231.2020.02.03.04.09.42; Mon, 03 Feb 2020 04:09:55 -0800 (PST) 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=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CJf3cu2h; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727501AbgBCKsc (ORCPT + 99 others); Mon, 3 Feb 2020 05:48:32 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:30292 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727368AbgBCKsc (ORCPT ); Mon, 3 Feb 2020 05:48:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580726911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4vl9t6G+rR4BEVeLAiNKfNbHtFriLKQ5FIXsIeC8dtI=; b=CJf3cu2hO5MzBy85zH6+/Zl9aYfKrXQ9A5hQ1oEnQl7X0ksbBeIHvvgKbXQwy+ofesgl7F pA1elqz41a0Ke0Pe0UCouJOY/Ms1E4/IRN7I1jsKsze9tTELfnmciEv9jTCiVvfyMeKdx7 FtulYpva2MagHUALhOsmQaZE8iR2A+0= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-359-1OjsCVGnO9azAcFPn-YtVg-1; Mon, 03 Feb 2020 05:48:26 -0500 X-MC-Unique: 1OjsCVGnO9azAcFPn-YtVg-1 Received: by mail-qv1-f72.google.com with SMTP id dw11so9192672qvb.16 for ; Mon, 03 Feb 2020 02:48:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4vl9t6G+rR4BEVeLAiNKfNbHtFriLKQ5FIXsIeC8dtI=; b=r4zSESJ30rji9sVqz7iADWthm1v08fHl+gDhdIv0rQSsyBtgcgab8F5zBgQWAzJQUE xkBBjVH2WoUpR+hg2WYFsX6j8byFQNkk8mz0OsEXkADc5OiDw5feZImbZ5PGWYdtzz5r fws0bJ++AdKIljT1l4+FYG2xtJBTWnix5thXDusKZNVsawMcMjTXMPz9oXiFDU4RIav9 +/tecJpTyuuSrfSBf53cqXlp/uAai/tLdZyPUWTS3lRftVXw43RxnKG+xD/WxBadh4Mw 6V1dGEpb0jy4CvxoZo567pURhC3p2dEGRmJkqQet78WvZt5VszOvUSk/hyMvT3byhtaZ G8EQ== X-Gm-Message-State: APjAAAU3lxhTCfZt5xeqwpNXhKUuV/RAM4HjGJoEDuHeCAhJYGmimEI/ EANW7C7YPdiDvVbuv1AqtCb2PyvQzBsYmbkbhDsQ1mqyUdaFG1GQt5vjJ0eM0cDNBYMEkD9KqgC BqdqDP6/KATzzwuoNPs8c7CBP939gsADfdbeYdJIZ X-Received: by 2002:a05:620a:782:: with SMTP id 2mr23117412qka.169.1580726906229; Mon, 03 Feb 2020 02:48:26 -0800 (PST) X-Received: by 2002:a05:620a:782:: with SMTP id 2mr23117385qka.169.1580726905695; Mon, 03 Feb 2020 02:48:25 -0800 (PST) MIME-Version: 1.0 References: <20200126194513.6359-1-martyn@welchs.me.uk> In-Reply-To: From: Benjamin Tissoires Date: Mon, 3 Feb 2020 11:48:14 +0100 Message-ID: Subject: Re: [PATCH] HID: Sony: Add support for Gasia controllers To: Jiri Kosina Cc: Roderick Colenbrander , Martyn Welch , linux-input , lkml , "Conn O'Griofa" , "Colenbrander, Roelof" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 3, 2020 at 11:02 AM Jiri Kosina wrote: > > On Tue, 28 Jan 2020, Roderick Colenbrander wrote: > > > Let me explain the situation a little bit better from our angle. These > > devices exist and from the Linux community perspective of course they > > should see some level of support. And as I said since this is PS3 > > generation I don't have much of a concern. > > > > Where it becomes tricky for any company in our situation is the support > > side. We don't know these devices and don't have access to datasheets or > > anything, but when such code is in our "official driver" it means we > > have to involve them in our QA process and support them in some manner > > (kind of legitimizing their existence as well). We now support this > > driver in a large capacity (pretty much all mobile devices will start > > shipping it) it puts challenges on our partners (not a big issue since > > just PS3 right now). > > > > As you can see this creates an awkward situation. I'm sure there other > > such devices as well e.g. counterfeit Logitech keyboards, USB serial > > adapters and other periperhals with similar challenges. In an ideal > > world the support would live in another driver, but since in case of > > this "fake" PS3 controller it "share" our product / vendor ids it is > > tricky. At this point there is not a strong enough case yet to augment > > the "hid-quirks" to do so, but perhaps if it became a serious issue > > (e.g. for newer controllers) maybe we need to think of something. > > If this is a big issue for you, one possible way around it would be > creating a module parameter which would tell the driver whether it should > those "fake" devices, and you can then turn it off in your products (or we > can of course start the "what should the default setting me" bikeshedding > :) ). > I am definitely not in favour of that :( The basic problem we have here is that some vendors are overriding your VID/PIDs, and this is nasty. And I do not see any reasons why you can't say: "well, we broke it, sorry, but we only support *our* devices, not third party ones". One thing that comes to my mind (probably not the best solution), is to taint the kernel if you are facing a non genuine product. We do that for nvidia, and basically, we can say: "well, supporting the nvidia blob is done on a best effort case, and see with them directly if you have an issue". Tainting the kernel is a little bit rough, but maybe adding an info message in the dmesg if you detect one of those can lead to a situation were we can count on you for supporting the official products, and you can get community support for the clones. One last thing. Roderick, I am not sure if I mentioned that or not, but I am heavily adding regression tests for HID in https://gitlab.freedesktop.org/libevdev/hid-tools/ Given that hid-sony.ko seems to only use pure HID communication, it should be easy enough to write regression tests for the devices, and this way you can split up the QA in 2: automated and upstream tests run by me for all devices handled by hid-sony, and your QA can focus on the actual physical hardware, and ignore all of the clones. Cheers, Benjamin