From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=213.167.242.64 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796045870; b=TyA9kdhfRJKRoznIHJKqOtXO14UJCDKY/Mv3pFMuGhEU5tfGaNhnYk4TVCWWC+EjMaUp cMUiSmLa9oTcAJknWO7uyWb+BZo2I8XUS4lfrnp3mG09o5l1coKg0L4s/MceBmChVWodM qnyXc/JooFfjFKEDdmh+vL/tKfZ4eKiilnthVpNBNOZeZ9x5j6D/YorFcwkuptU63/ZHI 1n8cBtW/tBkg9xyEJAhQ8CzZG8axcUgLFNs5AEqlJ5eqmk7tpZaW3RxKTpaPAkduSaDjt jv46l1IGHj844ZgSEQcfjrVtKrLC4WcdrKkjs8UwECu+CQY/ljkF1QW9q28c4G7j52g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796045870; h=DMARC-Filter:Received:DKIM-Signature:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; bh=HI28oejZSyvSFT8RuaF19L3SslCSXuTBiSA2im4x4qc=; b=ZyCg1k/fZ3WecBeo0YVkRKkSP/AWeI91DDqu1r4Pbf3DxuPo1rm43a4i8i7CMITYDqDl 9gqRzUh9/ryLjNRnWbgyuz9o9WK7JPO1QpJUqJO0Ob24bMwsYrmRxgwvtOyodOqbPdg/x 0I1qR4DIBonQZqM9XB7uT4CZc37y/+7svBU3o5k4YD1Gf2jevEzC/J2j2ZiMTSlYWSLl8 o1AjAJ3+w3MMmO7W6kzNZTP0XJ/05TafgtlIBqlZ3JAvzvEMk8yd5aMbFX/LPNzOuWK52 /GRGR71S8+NdAQyzSv9vqDsNvBLeuYLBsS+aTJ91LVyUPaXSRTlR2Yw9LVuz0Pizjpw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass header.d=ideasonboard.com header.i=@ideasonboard.com header.a=rsa-sha256 header.s=mail header.b=u+xQI6dD; arc=none smtp.remote-ip=213.167.242.64 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 40F60606A32F; Mon, 30 Nov 2026 13:37:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 40F60606A32F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.a=rsa-sha256 header.s=mail header.b=u+xQI6dD Received: from killaraus.ideasonboard.com (p773008-ipoe.ipoe.ocn.ne.jp [153.242.130.7]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9EABC4B0; Mon, 30 Nov 2026 14:35:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1796045711; bh=O9n5my03ibVS/i0q3lgukjS0ce5et1TIDORMdrXX9ew=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=u+xQI6dDmGmXYvd70oiSa0q9OfP+hctBVA3XCBntTrT4nuZmgL9WwRB4BoTqxFMwp cT5FedLDZ8BXGapkedwkEQ5oxoqPr0Ygy98cvn+fbNJU8AUkDyacBrGeK4kQn+CCr3 saWrnYubMExxr5tZDhJqp7BHac+NYTJiQsdNuySg= Date: Mon, 30 Nov 2026 22:37:44 +0900 From: Laurent Pinchart To: Ricardo Ribalda Cc: Hans de Goede , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] media: uvcvideo: Convert one quirk to a per_device check Message-ID: <20261130133744.GD91231@killaraus.ideasonboard.com> References: <20261002-uvc-sorted-v1-0-65f52e4d7e16@chromium.org> <20261002-uvc-sorted-v1-2-65f52e4d7e16@chromium.org> <20261130132132.GA91231@killaraus.ideasonboard.com> X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Mon, Nov 30, 2026 at 02:26:17PM +0100, Ricardo Ribalda wrote: > On Mon, 30 Nov 2026 at 14:23, Laurent Pinchart wrote: > > On Fri, Oct 02, 2026 at 03:29:06PM +0000, Ricardo Ribalda wrote: > > > It is the only quirk that does not use USB_DEVICE_AND_INTERFACE_INFO..., > > > convert it to a usb_match_one_id in uvc_status. > > > > I don't like this much, partly because it's a hack to enable 3/3, but > > more importantly because it shows that 3/3 won't work if we later have > > to add a device match that depends on bcdDevice. Can we do better ? > > Do not worry too much about 3/3. We can add a couple more tags. How so ? My point is that this patch's purpose seems to be that keeping the manual filling of usb_device_id for this device will break your auto-sorting. Did I get it wrong ? If that's indeed the purpose, then how will we handle device that need a different type of match ? > > > We could probably just use normal USB_DEVICE_AND_INTERFACE_INFO and > > > ignore the bcdDevice version, because the code already checks that > > > interval needs to be > 16, and I would expect that the newer versions > > > have fixed that. > > > > > > Since I do not have access to the hardware this is the most conservative > > > approach. > > > > I actually have that device, but I won't have access to it before I > > return from OSS Japan :/ > > We can reintroduce the quirk after you test it with real hardware if needed. > > > > Signed-off-by: Ricardo Ribalda > > > --- > > > drivers/media/usb/uvc/uvc_driver.c | 11 ----------- > > > drivers/media/usb/uvc/uvc_status.c | 7 ++++++- > > > 2 files changed, 6 insertions(+), 12 deletions(-) > > > > > > diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c > > > index b789bc55e02b..049566a4e5f7 100644 > > > --- a/drivers/media/usb/uvc/uvc_driver.c > > > +++ b/drivers/media/usb/uvc/uvc_driver.c > > > @@ -2740,17 +2740,6 @@ static const struct usb_device_id uvc_ids[] = { > > > /* The Imaging Source USB CCD cameras */ > > > { USB_DEVICE_AND_INTERFACE_INFO(0x199e, 0x8102, USB_CLASS_VENDOR_SPEC, > > > 1, 0) }, > > > - /* Bodelin ProScopeHR */ > > > - { .match_flags = USB_DEVICE_ID_MATCH_DEVICE > > > - | USB_DEVICE_ID_MATCH_DEV_HI > > > - | USB_DEVICE_ID_MATCH_INT_INFO, > > > - .idVendor = 0x19ab, > > > - .idProduct = 0x1000, > > > - .bcdDevice_hi = 0x0126, > > > - .bInterfaceClass = USB_CLASS_VIDEO, > > > - .bInterfaceSubClass = 1, > > > - .bInterfaceProtocol = 0, > > > - .driver_info = UVC_INFO_QUIRK(UVC_QUIRK_STATUS_INTERVAL) }, > > > /* MSI StarCam 370i */ > > > { USB_DEVICE_AND_INTERFACE_INFO(0x1b3b, 0x2951, USB_CLASS_VIDEO, 1, 0), > > > .driver_info = (kernel_ulong_t)&uvc_quirk_probe_minmax }, > > > diff --git a/drivers/media/usb/uvc/uvc_status.c b/drivers/media/usb/uvc/uvc_status.c > > > index 97c939206302..6f8eaecad3dc 100644 > > > --- a/drivers/media/usb/uvc/uvc_status.c > > > +++ b/drivers/media/usb/uvc/uvc_status.c > > > @@ -254,6 +254,10 @@ static void uvc_status_complete(struct urb *urb) > > > > > > int uvc_status_init(struct uvc_device *dev) > > > { > > > + /* Bodelin ProScopeHR */ > > > + static const struct usb_device_id bodelin_proscope = { > > > + USB_DEVICE_VER(0x19ab, 0x1000, 0, 0x0126) > > > + }; > > > struct usb_host_endpoint *ep = dev->int_ep; > > > unsigned int pipe; > > > int interval; > > > @@ -282,7 +286,8 @@ int uvc_status_init(struct uvc_device *dev) > > > */ > > > interval = ep->desc.bInterval; > > > if (interval > 16 && dev->udev->speed == USB_SPEED_HIGH && > > > - (dev->quirks & UVC_QUIRK_STATUS_INTERVAL)) > > > + ((dev->quirks & UVC_QUIRK_STATUS_INTERVAL) || > > > + usb_match_one_id(dev->intf, &bodelin_proscope))) > > > interval = fls(interval) - 1; > > > > > > usb_fill_int_urb(dev->int_urb, dev->udev, pipe, -- Regards, Laurent Pinchart