Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2964701rdb; Tue, 13 Feb 2024 02:47:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVy8D/t8QxKtZ6Pp+mkwKyLWoI6TIwJyXh0GjFh9QPm2oZa8X9ZYnK+aYABXIhGEdKTkUEErWYE7wH8RxliJEdS7oK/HxOBbwWzPz5PcQ== X-Google-Smtp-Source: AGHT+IEnXPHUxL33vFMBAXGU5AmmjTxPn+PfbUU4RGZzl3sCnlVE0dM0g7Gv+hxZFiUcArw/iSow X-Received: by 2002:aa7:86d4:0:b0:6e0:35b1:e172 with SMTP id h20-20020aa786d4000000b006e035b1e172mr8317010pfo.3.1707821260337; Tue, 13 Feb 2024 02:47:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707821259; cv=pass; d=google.com; s=arc-20160816; b=E6D32libIj15GfjGy6vVmpBJEh7RgzBKiy0QLJN/OEfG9ePjqZiMvALUgRMdaiBwSU /s5pnxnnAeOy5Bq4xk6FhWktRvKiRKFC8UHWfSoGLs6+IHao1U7hnOtNCbfi0KF5qX8A GbIKMa8iJgwswXjUs+zkDtg5/1phhmXRhfFjUrRDespKYpPbm9FtY8GW8O3q13czs47h dOYA6/+1pZamcl22bOJ/IRa8jmP4F2HrBmdV3kt/GiZvPvEI1cxQywoYri9LxaCX42Ni IH94cXq3U9H9g8Zq8M+8Eg2ucHGGZDvrFF1xG9dbPFq35SKvXeUkh+oKEjXWEr4CqwMO NX+g== 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:dkim-signature; bh=cZGMNc1a1zfEfZEiDJDtGeowO5261r1zSyKEt1n0Px0=; fh=APefyQaMSKSDFTnWZ6/AiMmWrR+WfW10kipgM3LP3RA=; b=pUpwC8rpmlQZ11xB8cRkgFF3lS54MfUZYgafRqMFuOe2YLmSesWFYKCUNpoigor3yZ 8s/trceY7hJ08t+6YA0PDofQ/53Q0qKhJoaNSoSFaBUp3VNAGFabyUmQwi6OEPqGp9Ms O0cyqrzVXAwf3PDDPOYBCMXjM8IeDeluIB1Ji9H5nQFzJ8HXQbTjCEdKtKZ+RBG1P3mU fYQKB0BsWT9HMlzD5c5YzV6cavxaE8sQPwfUra4Y18Xnc3nDXDCuN69f19oMIGSWJ+nH Ii//I/ZXqjmR63K+UrNESSlu5pkaMjRvy+CSfw6EaAcPaFdDtJi8PME32Jnj9JY7D9BI poCA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="TmEu4/T4"; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-63370-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63370-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCX13xSHnUbJLdSRoTzQEVwkfdMfUgsy4z2Ys/iYSZW5lBEMk6hMSOjzbhfV+HSg/SCePI1xE8r71Wno7mFKr1LgCuuKIlhmz1y2d3detw== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id z27-20020aa7991b000000b006e0a347f6ebsi5914215pff.90.2024.02.13.02.47.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 02:47:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63370-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="TmEu4/T4"; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-63370-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63370-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 5F9F72836A3 for ; Tue, 13 Feb 2024 10:47:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BED742BB06; Tue, 13 Feb 2024 10:47:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="TmEu4/T4" Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2895D1775C; Tue, 13 Feb 2024 10:47:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707821245; cv=none; b=ZssUiCFkslxCBRdCeqac/qGtNBF3AJi9I3DshU+cUQr1mJSE/Ve6n5AjXbpTj/EgiGDHQpsve2FExC7qRcT0aTktFqTL8yEGwWFWP+V2HatjVUa/jN3OUBnB4qoY0CikR/m4qWxKOPxT9nDOWZ6hWA97Ib/mL7VQ9eQyyPk7SVM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707821245; c=relaxed/simple; bh=LuZVB9/U46GxT3gi1nHL2CZ0+ZTFaMf0rDsOE7bl3hk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uYOwy8fdnzpRniTJOkdVxnE5L5lU6RhNqGtst0Yk0bWEXJMpkSECmDrNrwSoMUdcT0WTcQBhnFvfUTkTUXKkJFEG/mgxP3myTLY3gcnm5zkugkVYFL4kMsb3We+RIZJ5SjmpmaV5Jg4kzeUypfPNJar4N090MfGVQEMVbe1qCog= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=TmEu4/T4; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Received: from pendragon.ideasonboard.com (unknown [109.130.69.237]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1569C675; Tue, 13 Feb 2024 11:47:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1707821240; bh=LuZVB9/U46GxT3gi1nHL2CZ0+ZTFaMf0rDsOE7bl3hk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TmEu4/T4muelKKgbtFKqcPolTwHWbmCtPpMzX1aE0RScaQOkVU/BGQgyw6wrWKzCD ruxiLIkknUu5+KyeEq5ajNihe/TYwdmADq3l6qko5002lmZCjS4dv4J2QvBQXbf9+2 cX5Q1mqXJZFRmShzYgg4q5TfIhlfbBNL2BMKFsRs= Date: Tue, 13 Feb 2024 12:47:25 +0200 From: Laurent Pinchart To: Alan Stern Cc: Oliver Neukum , 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: <20240213104725.GC5012@pendragon.ideasonboard.com> References: <20240108-rallybar-v4-1-a7450641e41b@chromium.org> <20240204105227.GB25334@pendragon.ideasonboard.com> <6aade777-d97c-4c65-b542-14ce5b39abb6@rowland.harvard.edu> 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=utf-8 Content-Disposition: inline In-Reply-To: <6aade777-d97c-4c65-b542-14ce5b39abb6@rowland.harvard.edu> On Mon, Feb 12, 2024 at 02:04:31PM -0500, Alan Stern wrote: > 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. I don't mind either way personally. Oliver, could you try to find a good solution with Ricardo ? I'll merge the outcome. -- Regards, Laurent Pinchart