Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp376817rwb; Sat, 1 Oct 2022 01:01:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5nn3gwL9cDnwwyCEzJXjECnQ2fna1xLzd43fyeC6YksWsBW93nGZeC/00UoA/V9DooydhK X-Received: by 2002:aa7:c509:0:b0:458:cb1f:b9e1 with SMTP id o9-20020aa7c509000000b00458cb1fb9e1mr63429edq.369.1664611266549; Sat, 01 Oct 2022 01:01:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664611266; cv=none; d=google.com; s=arc-20160816; b=fSMNXamjXq68OObbG5Ls/+V1rYi/77F5Xvwawej1+bCAKfOxaDAbtAihC9gK84v+QU J5qXjod0zMLR5sNwwhze9jHVIf7i0FHIPNH7WLbl9yKrPUV1FhSDkfKnuB+jyZO+7b0t 9Q9kNzYi6Acjj3aRQU9e5HMR+ks+oJ0SHgUBMHyCxLy+Nb40QCN7hEnIeDLqhlGl0iD9 NVkTv/L8cdr7VvfXpajEKrikwIyox9pQfyxxCZUazIG6q4r3mJVvNJ5SRoJeXPminVTm W0st1D/Dfii0Iiz0Q0qzr2GldlRlpxqLV0yfAfjGUxZnKl/arhQFjbcP3iWZqgUZHHd5 2bnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=lkz8vNP/w7ukS+cswzYXk5HDAR3HLQeV+Gb12GuSW+0=; b=CsOHE3ZQ9zOIs5McEuGij1zon7shxE0Tgsh/WEuEn2gVa8m/YAcjxb96nQ3ZarQyqg 5dDJU8pNsGXey9QtJ2lF9dEiG982BiBhwS/8H4yhQ1KbIJMIEageuZh9zfHmIyntMBT2 L2fLRYZYI3c9W1wcWousUm2UjYGvpxdLk0LwfiP4sMerewZqj8g1mCp1tp14hZmAwAxt aW2i8f6vBe9LKibL+ENUFkalC/aQbyqzQdC1eoC5SJD0PgXPwLJL31CAv1GY8pUI58Yn QAl980atuUGJvke+4OvDaIehM9cC1GaVFtKzApB49VtYvyOtp9MPz+W6PuluyPuMQSe5 Uvtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=j90+Ya4c; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a1-20020aa7d901000000b00457f9c97f13si3510705edr.581.2022.10.01.01.00.35; Sat, 01 Oct 2022 01:01:06 -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=@linuxfoundation.org header.s=korg header.b=j90+Ya4c; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229507AbiJAHIK (ORCPT + 99 others); Sat, 1 Oct 2022 03:08:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229477AbiJAHIJ (ORCPT ); Sat, 1 Oct 2022 03:08:09 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3210C15D87E; Sat, 1 Oct 2022 00:08:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C9ED0B80B27; Sat, 1 Oct 2022 07:08:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC282C433C1; Sat, 1 Oct 2022 07:08:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664608085; bh=W4Ja25FWaaWt7ufd0WRR9moilESdaUHujQ1HovD4axQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=j90+Ya4cB4eZLni7oSlPz59BerIrrLTQlH1D/lXQyy42ab3qHsqlLOi/NGWP4OYTN lJIz6He3uSfA9L27cVuS6QvXbEtcHJIaixeBZCqJpCQ0hZezp0huYFyUvgu//A43ro lKoRXpnQMXMKPTLwjxvm9LmDhiRGHGKVOybcywh8= Date: Sat, 1 Oct 2022 09:08:41 +0200 From: Greg KH To: Paul Jones Cc: jikos@kernel.org, anssi.hannula@gmail.com, linux-@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] HID: usbhid: hid-pidff: Set Replay Length to Infinite when set to 0 Message-ID: References: <20220930225127.Horde.AdDRdase1XW5AUKNNLyXVo3@cloud.brak.space> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220930225127.Horde.AdDRdase1XW5AUKNNLyXVo3@cloud.brak.space> X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Fri, Sep 30, 2022 at 10:51:27PM +0000, Paul Jones wrote: > Greetings, > ? > Started using my Accuforce v2 Sim wheel on Linux. I was getting no response from racing simulators through Wine, but native linux test tools worked fine. It seems that many real-world applications will send 0 as the replay length, which was resulting in the behavior I was experiencing (nothing). It makes sense to interpret 0 as an infinite effect and therefore set the replay length of the effect to 0xffff. While the PID document does not explicitly state that 0 should be infinite, it does hint toward null values being interpreted as infinite. > ? > --- > ? > diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c > index 3b4ee21cd811..70653451c860 100644 > --- a/drivers/hid/usbhid/hid-pidff.c > +++ b/drivers/hid/usbhid/hid-pidff.c > @@ -301,7 +301,7 @@ static void pidff_set_effect_report(struct pidff_device *pidff, > ?pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0]; > pidff->set_effect_type->value[0] = > ?pidff->create_new_effect_type->value[0]; > - pidff->set_effect[PID_DURATION].value[0] = effect->replay.length; > + pidff->set_effect[PID_DURATION].value[0] = effect->replay.length == 0 ? 0xffff : effect->replay.length; > pidff->set_effect[PID_TRIGGER_BUTTON].value[0] = effect->trigger.button; > pidff->set_effect[PID_TRIGGER_REPEAT_INT].value[0] = > ?effect->trigger.interval; > ? > -- > ? > - Paul > ? Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree. You are receiving this message because of the following common error(s) as indicated below: - Your patch is malformed (tabs converted to spaces, linewrapped, etc.) and can not be applied. Please read the file, Documentation/email-clients.txt in order to fix this. - Your patch does not have a Signed-off-by: line. Please read the kernel file, Documentation/SubmittingPatches and resend it after adding that line. Note, the line needs to be in the body of the email, before the patch, not at the bottom of the patch or in the email signature. - You did not specify a description of why the patch is needed, or possibly, any description at all, in the email body. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/SubmittingPatches for what is needed in order to properly describe the change. - You did not write a descriptive Subject: for the patch, allowing Greg, and everyone else, to know what this patch is all about. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/SubmittingPatches for what a proper Subject: line should look like. If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers. thanks, greg k-h's patch email bot