Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2637949rdb; Mon, 12 Feb 2024 11:05:03 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCULNJmF6kVHz1ql7ZzzGJoRo/+5vW6VNdRKuifaFPLi+G9d1c/HtyoGeGgt5WNf1NZCbTPP09H2QSMm4tZ4rFNPrieWJsYkT7x8GrVAYg== X-Google-Smtp-Source: AGHT+IEPkMSaKAsEoCBzH9Wb5fxT2JcIdXsu3sU+qwQMsbI6gbfOuAw2ahgdH46cTrGzMK0n5u0m X-Received: by 2002:a05:620a:460a:b0:787:16e1:e970 with SMTP id br10-20020a05620a460a00b0078716e1e970mr1030989qkb.21.1707764702687; Mon, 12 Feb 2024 11:05:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707764702; cv=pass; d=google.com; s=arc-20160816; b=bOIYdqZRBhRrBTWYo1VkHBQt1uCkALZt9nMT865KGdt+SQXm/fx945sZZ6JpGzRK0F tw/nXiAIRW0wB7tgIEEDoP7SA9o8gG/OEJeXRHkgIUaPRdqEPIAm7a7NdnGw4iGAwcrq wO2+BX9bWqbsy6+OQ+BY9oLHalber6Eb37kdB9Vybqn+0+3Gb0Ks2eX3LOXqUMNJsBm9 7MIGs+6EhP7ZTmpA+VgRL6ACNb2xiDo5KXcFREQWSemGnchWjSTaGh41PE85m0QSuLO9 PwkC4xETYRneTytgKlMz0AczI3nx5NokKWKuHDJPej3JJf/xYNgoc5crtnnA1ZC9UFrG sw9Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=xXXyYr3sQD5tKrbgMyLN6JH6p9NMWrHK0RsqAvK+sQM=; fh=lu3AlOpezh/udAmDrcdMkpDbiE/1cLcM8jbC6yjsQew=; b=eG+VgF0kTMEvIZD2+BkSqIFSvZ5E4oIRqVpXLCRFKOqAKj8ZeOrPtXlBO9k3xNh5gb gjN/zACUlpqTWO9dbfyWzWghwAXepKAuL8SjA8++fRAMjx+jz7vqKtlcneYpcwfhpDOx GGIKrd48XYhEe3sFtYc5h4y20yF9+xKQmcniaJwFlGbUGgbXMCvcvML0DbrcMKOWaWuM 9PTIxhTOuztog+PAS0t8679QKJglWib8wmjIg0LAxaj4FUG7ZdeUpVXm+/7yRUBpqnGw 6uqtnSap1ePLPv+DSZzGdRGCrgm06ihkwttKOo8eMjVVY2laOlKiQ1t8TDEUXKTrTyFm mr9Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=netrider.rowland.org); spf=pass (google.com: domain of linux-kernel+bounces-62252-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62252-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu X-Forwarded-Encrypted: i=2; AJvYcCXnqlOiT2XzvPcdA1CjHQ2DBUblGVuk5Iqid6w5iczCvqopkn3UMN6gxsotC9z/6+0iGSsggBUWwWyRrzgD72JYpJOh+cAKWG3a0yBvGQ== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id a12-20020a05620a102c00b00785b33ee81fsi6456494qkk.623.2024.02.12.11.05.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 11:05:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-62252-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=netrider.rowland.org); spf=pass (google.com: domain of linux-kernel+bounces-62252-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62252-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6F3111C2117E for ; Mon, 12 Feb 2024 19:05:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B1D2F47A5D; Mon, 12 Feb 2024 19:04:39 +0000 (UTC) Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by smtp.subspace.kernel.org (Postfix) with SMTP id 774BE4644E for ; Mon, 12 Feb 2024 19:04:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.131.102.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707764679; cv=none; b=mc8NxCSsNkv9Lj6E7JlCNfLYocQJI421MwvswcKrLktrPMDPTtF+RcYuwMZHb8J7yMF9EkqOT94uKADeSkrx55NVAoEvcbVQUqwVqKKmWXssnX0fsab5CxxC27Mrgq2b5xOYmg2pG1FgKEsO0PJlfTM4XFIE/NiY1q7S2h7FprA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707764679; c=relaxed/simple; bh=L88DGTxBYgIkeriiYxq9PZjYUYpswT+GoOTTkCN5DvQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UD2f5FHIwFeD+DYCe9614zvo8iISaaP5lnZgssv9GxBxxrtEB1yut/IWPZ5DyOgDirLI/0FEAeXnkSWXQHnYGWAwCz70/l33pt5QFW6M9vKyo2GkIg9w0FCSi4Nr6QDsqFrsDfqZoLDl+5d0VU/clLPsWR7KRq6uuXkImsB7hnM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=rowland.harvard.edu; spf=pass smtp.mailfrom=netrider.rowland.org; arc=none smtp.client-ip=192.131.102.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=rowland.harvard.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=netrider.rowland.org Received: (qmail 345404 invoked by uid 1000); 12 Feb 2024 14:04:31 -0500 Date: Mon, 12 Feb 2024 14:04:31 -0500 From: Alan Stern To: Oliver Neukum Cc: Laurent Pinchart , Ricardo Ribalda , Greg Kroah-Hartman , Mauro Carvalho Chehab , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v4] media: ucvideo: Add quirk for Logitech Rally Bar Message-ID: <6aade777-d97c-4c65-b542-14ce5b39abb6@rowland.harvard.edu> References: <20240108-rallybar-v4-1-a7450641e41b@chromium.org> <20240204105227.GB25334@pendragon.ideasonboard.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Feb 12, 2024 at 01:22:42PM +0100, Oliver Neukum wrote: > On 04.02.24 11:52, Laurent Pinchart wrote: > > Hi Ricardo, > > > > Thank you for the patch. > > Hi, > > sorry for commenting on this late, but this patch has > a fundamental issue. In fact this issue is the reason the > handling for quirks is in usbcore at all. > > If you leave the setting/clearing of this flag to a driver you > are introducing a race condition. The driver may or may not be > present at the time a device is enumerated. And you have > no idea how long the autosuspend delay is on a system > and what its default policy is regarding suspending > devices. > That means that a device can have been suspended and > resumed before it is probed. On a device that needs > RESET_RESUME, we are in trouble. Not necessarily. If the driver knows that one of these devices may already have been suspend and resumed, it can issue its own preemptive reset at probe time. > The inverse issue will arise if a device does not react > well to RESET_RESUME. You cannot rule out that a device > that must not be reset will be reset. That's a separate issue, with its own list of potential problems. > I am sorry, but it seems to me that the exceptions need > to go into usbcore. If we do then we may want to come up with a better scheme for seeing which devices need to have a quirk flag set. A static listing probably won't be good enough; the decision may have to be made dynamically. Alan Stern