Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3275860pxa; Tue, 18 Aug 2020 10:52:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwws1EtAhoIqvOA5d5IyXj+l4bL7waSCabM/4voG84H2BhlNf07+PE16Q0q46w3PCszNp/b X-Received: by 2002:a17:906:138b:: with SMTP id f11mr20733492ejc.310.1597773168684; Tue, 18 Aug 2020 10:52:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597773168; cv=none; d=google.com; s=arc-20160816; b=pW2VEJCCfNFM6aPNPtgbZOJbFgZiwxCE6kQ2zN/txmayuOfEd73tWY9gZkgbhXrawo 9JtUBzzQtzTJXy0DJ/wQUMndBq+YjFKOC4Dsz8bkHNJfDYAgf01U6OtsmAkW4rJAiuK3 9RbusRwiXeGkzVy7KQbG29736CVrehrbTz07EaoaaZpCROaBIHhyMQPNO7u86Oi2Ivs/ 3FbYE2VTYhDUDBTv+7hz1peliydEMhHIUGyHcUKuUYVWd+c8XVHQpSNywAANvns8F/Ku ki+ck8qYT6ahCl8iH5A9S0OkG6WDmXMZvbdHyu93xQCBdublHXMnvHIG9heKGu0iWUsj gpMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=bzS/Q1LBuwlrPZpbudfOJxlt1tUw51un2mpj+rmWs7g=; b=RUotPQQONT0TovakFuBDJ5BJ3Jo9FYWm6wDr9gOgXorL2K5YnFzCUkQfoqn5zMI+NA bXE/CvJZA6UD5j9b6lC+kH35mvamsG0kB9dyYaiEXJpQJoKMJfpQ7IyOV2h/a45ej5Sb KwGh7L8F1AqX//ozdimwWYodRe3tMGda5zwraQYsfqDWB2OTCuVDg3iB/tBYZTuTULk5 rRWa1LbIpXx8QvlfMW2CvrmlL9Sg1mjFlQNLMgZa7kmtTofoyzC4GMH4ed3RE6MjwPII t6B2wB5bxCXTx22ySRfkYYrsMnnys1LA4fcgk5hNWjDkqKpUDbxwetbtrpyWn4P7I52y YJrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=T3wpR2WB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pg13si13997487ejb.681.2020.08.18.10.52.23; Tue, 18 Aug 2020 10:52:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=T3wpR2WB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726675AbgHRRvn (ORCPT + 99 others); Tue, 18 Aug 2020 13:51:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:55270 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726552AbgHRRvm (ORCPT ); Tue, 18 Aug 2020 13:51:42 -0400 Received: from pobox.suse.cz (nat1.prg.suse.com [195.250.132.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7251C2080C; Tue, 18 Aug 2020 17:51:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597773102; bh=J4/+5tA8Fug1dB4bZX92MmZfbq9+rUEgquwGY02+xII=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=T3wpR2WBUlCabkr4fsPmJg4+KcnhOa796FGKnSRNr7m5pn8yGRiPDm4jc9BQkjccc Bwa2CLWXsztXFXONIUPACeVTcvT3h8yHJynGrOaR07PEDVjC7K88faZ/xWoL6UzYNo y1zS+yT0s4GxQqfW8EFz0g5mlVCch/a6PYSb+Q7Y= Date: Tue, 18 Aug 2020 19:51:38 +0200 (CEST) From: Jiri Kosina To: Marius Zachmann cc: Guenter Roeck , Jean Delvare , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, Benjamin Tissoires , Dmitry Torokhov , linux-input@vger.kernel.org Subject: Re: [PATCH v2] hwmon: corsair-cpro: fix ccp_probe, add delay [HID related] In-Reply-To: <79890342.HV0Al07Iil@marius> Message-ID: References: <20200817070040.7952-1-mail@mariuszachmann.de> <20200817153533.GA243558@roeck-us.net> <79890342.HV0Al07Iil@marius> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 18 Aug 2020, Marius Zachmann wrote: > > > Possibly because of the changes in usbhid/hid-core.c the first > > > raw input report is not received during ccp_probe function and it will > > > timeout. I am not sure, whether this behaviour is expected after > > > hid_device_io_start or if I am missing something. > > > As a solution this adds msleep(50) to ccp_probe so that all initial > > > input reports can be received. > > > > > > Signed-off-by: Marius Zachmann > > > > Let's just ask the HID maintainers. Is this expected, and the correct fix ? > > This seems to be a problem with "HID: usbhid: do not sleep when opening > device". There is a bug report with some Logitech devices at the correct > thread. These drivers also use hid_device_io_start and fail. Seems to me, > this is the same problem and I retract this (not so beautiful) fix until > this is sorted out. [ CCing Dmitry ] Yeah, this problem popped out also in other contexts, where many Logitech devices didn't probe properly, because of the race where the first IRQ is dropped on the floor (after hid_device_io_start() happens, but before the 50ms timeout passess), and report descriptor never gets parsed and populated. As this is just a boot time micro-optimization, I am going to revert the patch for 5.9 now, and we can try to fix this properly for next merge window. Thanks, -- Jiri Kosina SUSE Labs