Received: by 10.223.185.116 with SMTP id b49csp3629873wrg; Mon, 26 Feb 2018 03:25:48 -0800 (PST) X-Google-Smtp-Source: AH8x227TfFtQp+oq56f93He8DUfnLQAro7PkdGL6MNLJfGqf+pvnriJh01qw1KZJHC9MPHHxuMk1 X-Received: by 2002:a17:902:724b:: with SMTP id c11-v6mr10323426pll.352.1519644348203; Mon, 26 Feb 2018 03:25:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519644348; cv=none; d=google.com; s=arc-20160816; b=vgwKIB/hIUSl3p9Lkj5XqsiUUK4rUhairIxzIYEyNSH2hvbMYBmS8BLYa9qHfhrP06 UNmiYHsskC+/WVZXqMKLcycgK4WbCVTVsW5xTtd1Q+9iCvhfSgy2Tdb0nb9sdK2r4C8P +odvRbPx6chbNDC5tBJUK4ijK7zHwuVBZ8XW7vtaJU2Q3paGsJiEp9Q+IwAE9eEKc8AM ynJEbg8wbp55WY5wL+QxQcHVgqV+J2mqgMK8t66VX7F/qLXZqk2iHHOV8JrC2wvRN45a SDn5y0u3qyHzVAH+G92ZulDJihotxvW7UQUwtaheC7R2eV1/30G16gtXgRhawpAAmRVN 0bLA== 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:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=uCP8G82rtbvrielg0gFn5zrpnxH+GXLIQPPJpWtVR9A=; b=PkEfTPVUzBZXraNn1mYOOehR4FmI0w7e0B0kxDdDShgHhMnkaYynxV46CilUWFA0fh 7kKE5WAlgrEJQO1Xpsa+TlvjPMvLOGtHnA3jhProeHb8/j0m6OfRRpHVM0LMuiOfEsiF Vf1hjPRJaSRKwzjuFRnVLoYQfsuP9HRM29oebk9oBSw66aSqRs5HMKFbqIRuvw8rkatg CKW5obudEKHFG6M4c00NYP+8Sf+HccGTvxy0HFzXIYx6nFGWPoyarG3Gy28g9WL7urnf G1VzWiTwZx1lA4fJjrh7jzUdYcBHBOkg2fX/OXEbqPFY/1oVdDNWVNjuz8MQjwK3+VMi EDSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bwkGJ20o; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a12si5440763pgv.672.2018.02.26.03.25.32; Mon, 26 Feb 2018 03:25:48 -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=@gmail.com header.s=20161025 header.b=bwkGJ20o; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752481AbeBZLYY (ORCPT + 99 others); Mon, 26 Feb 2018 06:24:24 -0500 Received: from mail-it0-f52.google.com ([209.85.214.52]:54598 "EHLO mail-it0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751877AbeBZLYW (ORCPT ); Mon, 26 Feb 2018 06:24:22 -0500 Received: by mail-it0-f52.google.com with SMTP id c11so1103552ith.4; Mon, 26 Feb 2018 03:24:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=uCP8G82rtbvrielg0gFn5zrpnxH+GXLIQPPJpWtVR9A=; b=bwkGJ20ozBOu896h7p6mnQkycphhK+4aRsRnG8R53Op1QrET/C6W+kkALP+ycZjv2b EvKeC6HD8CmIcvFUoSzWuRPD2Vquk22P0ID88CE6bO3TAaJZ+qOULwAKLoVa51MFKp8l HKq04bLD7PLBcQpRLvhUZ56I1KKdHOGEJTDnv0mNJPCnS61QLcd4tKtnpNM43RZDi0Bi tAIC11my6r5C07KlCylg3MupH4iuMZbA6e7Risn7eqV/IK+uBjLw145hVe1crVTg15OU UbqypNA0zpM1xgw/AFLl7dGnLnrHfXXAxvs0PP9bjPefEKZ1z0EIFfeWkYclUlQ3ohyv Nqzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=uCP8G82rtbvrielg0gFn5zrpnxH+GXLIQPPJpWtVR9A=; b=S3mKWUpLlrKnhZqvc0uovKnfJDZplyahymmphinG4zcswKmM+mjmmqcHELIJakNLGW LywfTum28rg6xXWMeXRmj86g7tInd5PoTUqt8CnVwTjeI3kPedo41CSJ8zjFdSXWnFc4 Ttez32sURmPf+8LrWIy34tZ5+ibH4PmUAdmyZh4EONUGOH0W8EcKeAdQ6qh3lMdROOoJ DwyksHErgZ7VvrPzgMv5Ot8CXnJCI7nTL7JUsA79LpJ/m27myb+ORUSEhSTsdE3HNHKd oTMfsmSu6wlDZf7hYDD446P9zQUEUP6iwIhnsKFiqa2l7XR80Qz5+pa+ufE+4IiNImVo 63+g== X-Gm-Message-State: APf1xPBJ1AasI57GqV/6l08VUcLqT39qtXeHcK6RtxmlcDLtsPxF3flG ETnNNMP6ZDjQN+D0Qp24ScaG4k9z2yT3woMASa8= X-Received: by 10.36.128.200 with SMTP id g191mr7176637itd.41.1519644261879; Mon, 26 Feb 2018 03:24:21 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.225.144 with HTTP; Mon, 26 Feb 2018 03:24:21 -0800 (PST) In-Reply-To: References: <20180225185250.10759-1-rodrigorivascosta@gmail.com> From: =?UTF-8?Q?Cl=C3=A9ment_VUCHENER?= Date: Mon, 26 Feb 2018 12:24:21 +0100 Message-ID: Subject: Re: [PATCH v3 0/3] new driver for Valve Steam Controller To: Benjamin Tissoires Cc: Rodrigo Rivas Costa , Jiri Kosina , "Pierre-Loup A. Griffais" , Cameron Gutman , lkml , linux-input Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-02-26 10:50 GMT+01:00 Benjamin Tissoires : > Hi Rodrigo, > > On Sun, Feb 25, 2018 at 7:52 PM, Rodrigo Rivas Costa > wrote: >> This patchset implements a driver for Valve Steam Controller, based on a >> reverse analysis by myself. > > To me, the code looks OK now. I haven't got the time to do a better > review, so giving my: > Acked-by: Bnejamin Tissoires > > However, before we include it, I'd like to have the ACK from > Pierre-Loup and Cl=C3=A9ment. They should be more qualified than me to sa= y > if this will interfere with the official Steam client (I think we are > good now, but that's just my opinion). I am not qualified to speak about the steam client, it has been a long time since I have a look at how it uses the controller and I think it changed a lot. I checked the code and I think you are not handling wireless connection correctly. If a wireless controller is already connected when the driver is loaded, you will not receive a connection event and forget to register the controller. You can send a 0xb4 request with empty parameters (0xb4, 0x00, ... ) to force the receiver to send its connection status (as the type 3 event you are already parsing). Since user-space program may also send this request, you should make sure the driver works if it receives a (dis)connected event when it is already (dis)connected. > > Cheers, > Benjamin > >> >> This is reroll v3, codenamed "lazy lizard". Changes from v2: >> * Use RCU to do the dynamic connec/disconnect of wireless devices. Plea= se, >> to anybody that knows their way around RCU, review. >> * Remove entries in hid-quirks.c as they are no longer needed. This all= ows >> this module to be blacklisted without side effects. >> * Do not bypass the virtual keyboard/mouse HID devices to avoid breakin= g >> existing use cases (lizard mode). A user-space tool to do that is >> linked. >> * Fully separated axes for joystick and left-pad. As it happens, there = are >> people with too many fingers. >> * Add fuzz values for left/right pad axes, they are a little wiggly. >> >> Notable changes from patchset v1: >> * Remove references to USB. Now the interesting interfaces are selected= by >> looking for the ones with feature reports. >> * Feature reports buffers are allocated with hid_alloc_report_buf(). >> * Feature report length is checked, to avoid overflows in case of >> corrupt/malicius USB devices. >> * Resolution added to the ABS axes. >> * A lot of minor cleanups. >> >> Rodrigo Rivas Costa (3): >> HID: add driver for Valve Steam Controller >> HID: steam: add serial number information. >> HID: steam: add battery device. >> >> drivers/hid/Kconfig | 8 + >> drivers/hid/Makefile | 1 + >> drivers/hid/hid-ids.h | 4 + >> drivers/hid/hid-steam.c | 777 +++++++++++++++++++++++++++++++++++++++++= +++++++ >> 4 files changed, 790 insertions(+) >> create mode 100644 drivers/hid/hid-steam.c >> >> -- >> 2.16.2 >>