Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp986126rwb; Thu, 6 Oct 2022 07:08:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM461ayKyggMXFdopeAP+sZG/e+bm0Lkw83eUT323i2eB2/jWMy8mG8Aeosc848ukK54E0II X-Received: by 2002:a17:902:f549:b0:177:f7ca:c870 with SMTP id h9-20020a170902f54900b00177f7cac870mr4828827plf.4.1665065312616; Thu, 06 Oct 2022 07:08:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665065312; cv=none; d=google.com; s=arc-20160816; b=o04UfDRH2a7i8DYgOxgzgqFxdnwshTg4c6mrOPOEaXfdaUEplGsKpDuF0w4FVPLO9w L7FcNqrwJl5omQwq6dyQ7cFYIZJWulml6vjASehX7ybiMx5G0oBsvzj9hqThJYDGnSly mZHuGpmcBb3Fh/pnaiIqNYhwi1qt+UgTG+3rrfqXnnQ9S/lJexAGNJtxPjLNwyKuHNvb zX5J+6hF5jIYh+dmpa5OkQCshZYI06+YF5/AC0MSGRZCXpC9rDHS+Ia6OhM9j4CZFTo5 79KWCgHHax0b2FQoOyYSnTWUIsOlGiy2tNhy3WSqArkN+Op1vj4R5XHYEot54m3Ybwcb VRCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ItWFOLvZ7RFflQ0r1IJBOW8mA5I5+0QaLapZDNLKRhE=; b=ICo6VlltwgVtH8OJCSNmWGSmR8kg2nYcs+9SwbiNK21qqOHy1l79elP2xsXohj20lm 1WaKeCAyWqQ7UwsxmTT2KkgNi+bZ9MqRG+9v/C+zpZ+nQi0PUwLfbdcodBWQmlVNY/k0 fgZrm1cA+fv/NJW34IgGIhnClMexAVpsN1Kys92YiaZ/qEsT3OBCt/LiRks+K+czQwS8 +QLtXS9xu3Qb+Y4fbz4VbDZC0lUEUPM/JdUCTtIguTCyNBuw6BzT5z8t05Aubxn6sJzH EyPYRa0MYZThB4zI031c/1xdkws9afAnLXy3FBo1fub4JXOBE1JhS7JqLlAkmjWlV7YG qoQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=oBOCdlgX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v11-20020a63bf0b000000b0043c3fa353d6si19256950pgf.153.2022.10.06.07.08.17; Thu, 06 Oct 2022 07:08:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=oBOCdlgX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230206AbiJFOCQ (ORCPT + 99 others); Thu, 6 Oct 2022 10:02:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230404AbiJFOCO (ORCPT ); Thu, 6 Oct 2022 10:02:14 -0400 Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90EA8AA3DB; Thu, 6 Oct 2022 07:02:09 -0700 (PDT) Received: by mail-yb1-xb33.google.com with SMTP id 207so2364954ybn.1; Thu, 06 Oct 2022 07:02:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ItWFOLvZ7RFflQ0r1IJBOW8mA5I5+0QaLapZDNLKRhE=; b=oBOCdlgXZ+gUdiAGOyJsqVoyjgq6eHLXeCRDoVkCtiyYLLgR7+NMgu5YNNcNw/bCth QHycWXAuQdhfAQ76ghOl/v4DKvBGckJMxx6Xp8tqOuyKiXgQqNNr01kFXjPVFEoNeuXz lPmJYfoh0uwYkFMpC6fWXDObwUBgLMLQLEdXD1G6QiKqeq7NAtAjzmpIfObcHtZOvP6T 2lzLEnw5RyLLUvilQM7Kmc/nOs4RQYQCyqMLKhylJ2tdq0r9Ovx7qBnBsBwDz+tRXApB OMwd3sqZa6AbIF3wyO1tibMTVOzAk3oq06VbzvfgSz5GrmvEaAq3eTCZ4LmF2MYxTZDT UDSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ItWFOLvZ7RFflQ0r1IJBOW8mA5I5+0QaLapZDNLKRhE=; b=zY69MuUjeSdmm818Oise4Bx4d5ENoD5Ku9amE/p6QgLh5LS9JrvIw2ODZap32J9SCR I+yoPHZVEBPfwqE4JXxayzIRi/fvzan0lD+owJ4nMwCvfPZAwyKt4Lxj40o/5F7NU5KM DGRtECCp5k6VYpgmITtTqqTPhgzBg59G0ICY0b4Ld0/Afe6XpcS+0S9A6CXXHfS7mVfN PcKvddbybmEi1gPQFc2B4nJ/Sm0R8vL6yiGuoGB4FrIPdIuJ0HV0LrItvPFx8s/K1gaK 8DlenrluRv93g2ZCnLvwdx7UEOi3Q+4YKGCJiaXwrBjABvCO/zTVNtLzP7RB1YgUqLj4 YyrQ== X-Gm-Message-State: ACrzQf3wwbEQMllfQG5Jvbhu80myEX4QTll6QHRUm3ldnjNyHex1aven AuPYh7beGJU9cllntNpGnFclRm3Rb8DMaDIqozU= X-Received: by 2002:a25:3ac1:0:b0:6bc:d21:a35 with SMTP id h184-20020a253ac1000000b006bc0d210a35mr4487401yba.526.1665064928544; Thu, 06 Oct 2022 07:02:08 -0700 (PDT) MIME-Version: 1.0 References: <20221006132240.3706-1-hcvcastro@gmail.com> In-Reply-To: <20221006132240.3706-1-hcvcastro@gmail.com> From: Roderick Colenbrander Date: Thu, 6 Oct 2022 07:01:57 -0700 Message-ID: Subject: Re: [PATCH 2/2] drivers: hid: warn feature report 0x81 To: Henry Castro Cc: Jiri Kosina , Benjamin Tissoires , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 6, 2022 at 6:22 AM Henry Castro wrote: > > Unfortunately, my PS DualShock 4, does not support > the feature 0x81 to get the MAC address. Instead, > use a unique hash to fake a MAC address, so I can > use DS4 to play Retroarch :) > > Signed-off-by: Henry Castro > --- > > >> I see in the other email. If it doesn't support this request, it is > >> likely a clone device. We are about to submit a brand new DS4 driver > >> (for hid-playstation). It will use a different report (0x12) if I > >> recall which does the same thing. That's the more mainstream one we > >> use. > > I have 2 DualShock 4, I did not notice but I have one DS4 compatible > (clone, I guess). > > The DS4 Sony -> returns -ETIMEDOUT > The DS4 clone -> returns -EPIPE > > Look great the new DS4 driver :) > Just for reference if you want to try out if 0x12 works, you can try this code. This is from the new driver (ps_get_report is from hid-playstation, but you can just use one of the existing hid calls) if you wanted to try. #define DS4_FEATURE_REPORT_PAIRING_INFO 0x12 #define DS4_FEATURE_REPORT_PAIRING_INFO_SIZE 16 if (hdev->bus == BUS_USB) { buf = kzalloc(DS4_FEATURE_REPORT_PAIRING_INFO_SIZE, GFP_KERNEL); if (!buf) return -ENOMEM; ret = ps_get_report(hdev, DS4_FEATURE_REPORT_PAIRING_INFO, buf, DS4_FEATURE_REPORT_PAIRING_INFO_SIZE, false); if (ret) { hid_err(hdev, "Failed to retrieve DualShock4 pairing info: %d\n", ret); goto err_free; } memcpy(ds4->base.mac_address, &buf[1], sizeof(ds4->base.mac_address)); } else {