Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3472001rwd; Sat, 3 Jun 2023 06:03:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5i/sXLOQENdx+3LB23hkHsYZWSK15mThmWqgMTBnp6hK9WjBwfsCazZjqb3uPuLoUhN6+/ X-Received: by 2002:a05:6a20:6a2a:b0:114:788f:ae3f with SMTP id p42-20020a056a206a2a00b00114788fae3fmr373302pzk.57.1685797429883; Sat, 03 Jun 2023 06:03:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685797429; cv=none; d=google.com; s=arc-20160816; b=eUqjT11tkq2x0eiQ9mOxXipukbHx7A5OKIb5pAFN+lyddrjDkubWrYzP/m4AmAkugc RzvHN77/vI0OV+8tMsd0u/W2t1TIgasc7vxkTTjQc/rqSH6o92vIxUzT07E9oF7yFXht 1wqVDYaeLKzHB+IzbYY9+5TK75kGI5vyxuzWwoiHNVUvqphqte66/DL85QmZnxMY6iap g1BUreS2BLg3aIWX4j/H2hnSgcsDf696EnIbmfn5nzPZceoosJkfqQ3F6ZuDL8uimL/B m3AzlVtB1HgbPsPGPS1przSHodFLEC8C/B0a0394ZW0tepnLbqqWLLPvATs15H7HM/mo DOZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=pdj4l0LUH4h4U20Slhm07KyuJw7rqLpCA8OQflL0Zzg=; b=XGnZKkOYk1ZBiHXnJ4gB9I6YlSS9kslZ31fx/XAmNhe+fB8zpehvRpYxDHDySWVn2o QMbqveeelK+Bt3CZvmLh+h+hVBDjeluSju3y970n+tZC5Jy2j/I4XdfdJYVUVPdwvXu9 wrA4m2rPgc+6obvt5lRfu7Rl3QSyLzu6EialHfQHpFZBoJ5ul6yGIKzYILiLXEpa8rQb 8cc6D6TCDz0NxA7c0s04sAZzxancAq9BKQ8L2lk0d/tZdabjj9KnnU5ukBUpwcXZZXb9 g9SoZCtbSdLT20GMOPI1S+AQZKP6of/8j8uAfLvFvrx0qzpxfsJ7/ulXyHL4W6T6QGnf rK6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=F6FhRhDq; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f15-20020aa79d8f000000b006463201bb55si2324382pfq.325.2023.06.03.06.03.36; Sat, 03 Jun 2023 06:03:49 -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=@kernel.org header.s=k20201202 header.b=F6FhRhDq; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236007AbjFCMlN (ORCPT + 99 others); Sat, 3 Jun 2023 08:41:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230185AbjFCMlM (ORCPT ); Sat, 3 Jun 2023 08:41:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94BC0F5; Sat, 3 Jun 2023 05:41:11 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 1DE1B60AC1; Sat, 3 Jun 2023 12:41:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE49BC433EF; Sat, 3 Jun 2023 12:41:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685796070; bh=syWTleteIP/DnA6u1wvwOOdt0s9GcQOyPIaILs8YIpE=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=F6FhRhDqej0X8NRtLC1Sl2jTS20q9zp5CAG13iWboBApH2tb294iljcnsS/CAupa2 y3fpTnf4bFOvWF4NU2ltR41xqwuwV+QljF5ZI10SKgEsj3kyAwF9DmWNTZ8UKm/MHm CLZozKSLAUxEKiYmcGPw6RiGwBSlzJ9PrsHTtS8uoY2R1awiokZHU1kQEJxmLBIWWm WwPkOmJMoYSLEUcsv2ZZFRcJt/Df9LBdRMkAArZtLU4NJK0fSYbglED+dylV9Vz5Zn VqOtaDnip2lRNzFpFn5sAySa4imamn+aDtMvPQVJrv1ZIowaDVDvH9CW6DvlPFYgKa fYkOf+qnQhmcw== Date: Sat, 3 Jun 2023 14:41:06 +0200 (CEST) From: Jiri Kosina To: Bastien Nocera cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Benjamin Tissoires , "Peter F . Patel-Schneider" , =?ISO-8859-15?Q?Filipe_La=EDns?= , Nestor Lopez Casado , Mark Lord Subject: Re: [PATCH] HID: logitech-hidpp: Handle timeout differently from busy In-Reply-To: Message-ID: References: <20230531082428.21763-1-hadess@hadess.net> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-7.3 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,T_SCC_BODY_TEXT_LINE 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 Wed, 31 May 2023, Jiri Kosina wrote: > > If an attempt at contacting a receiver or a device fails because the > > receiver or device never responds, don't restart the communication, only > > restart it if the receiver or device answers that it's busy, as originally > > intended. > > > > This was the behaviour on communication timeout before commit 586e8fede795 > > ("HID: logitech-hidpp: Retry commands when device is busy"). > > > > This fixes some overly long waits in a critical path on boot, when > > checking whether the device is connected by getting its HID++ version. > > > > Signed-off-by: Bastien Nocera > > Suggested-by: Mark Lord > > Fixes: 586e8fede795 ("HID: logitech-hidpp: Retry commands when device is busy") > > Link: https://bugzilla.kernel.org/show_bug.cgi?id=217412 > > --- > > drivers/hid/hid-logitech-hidpp.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c > > index 0fcfd85fea0f..2246044b1639 100644 > > --- a/drivers/hid/hid-logitech-hidpp.c > > +++ b/drivers/hid/hid-logitech-hidpp.c > > @@ -314,6 +314,7 @@ static int hidpp_send_message_sync(struct hidpp_device *hidpp, > > dbg_hid("%s:timeout waiting for response\n", __func__); > > memset(response, 0, sizeof(struct hidpp_report)); > > ret = -ETIMEDOUT; > > + goto exit; > > } > > > > I have applied this even before getting confirmation from the reporters in > bugzilla, as it's the right thing to do anyway. Unfortunately it doesn't seem to cure the reported issue (while reverting 586e8fede79 does): https://bugzilla.kernel.org/show_bug.cgi?id=217523#c2 -- Jiri Kosina SUSE Labs