From: Hans de Goede <hansg@kernel.org>
To: Angel4005 <ooara1337@gmail.com>, Ricardo Ribalda <ribalda@chromium.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
linux-media@vger.kernel.org,
linux-uvc-devel@lists.sourceforge.net
Subject: Re: [REGRESSION] uvcvideo: Grandstream GUV3100 (2bab:0011) broken on recent kernels (including LTS)
Date: Thu, 9 Oct 2025 11:59:30 +0200 [thread overview]
Message-ID: <b2ffa6cf-4d7e-48ca-94ce-2dd814a45692@kernel.org> (raw)
In-Reply-To: <CAOzBiVv2yzmawqLk-womOJFpx_dAWW9z6EmSqxADyVOPHTaymw@mail.gmail.com>
Hi Angel,
On 9-Oct-25 11:22 AM, Angel4005 wrote:
> Hello,
>
> Thank you very much for your quick and helpful responses!
>
> I confirm that the problem seems to be related to duplicate IDs in the
> descriptor of my Grandstream GUV3100 device.
>
> Unfortunately, I was unable to test the proposed patch, as kernel
> building is beyond my current capabilities. I am not experienced in
> such matters and do not want to risk the stability of my system.
Can you perhaps ask for help on the forum of your distribution?
Chances are someone can help by building and providing 6.12.51
kernel-pkgs for your distribution with the suggested patch added
to the build. Then you can just install these pkg with your
regular distro package manager which should be easy and safe
to do.
Regards,
Hans
> The exact breaking point when the camera stopped working was found:
>
> * Last known WORKING kernel (GOOD): 6.12.50-1-lts
> * First known NON-WORKING kernel (BAD): 6.12.51-1-lts
>
> I hope this information will help pinpoint the commit that caused the
> regression.
>
> Thank you very much for your help, guidance, and understanding!
>
> чт, 9 жовт. 2025 р. о 09:55 Ricardo Ribalda <ribalda@chromium.org> пише:
>>
>> Hi Angel
>>
>> Thank you very much for the detailed report.
>>
>> Your device has two entities with the same id:
>> VideoControl Interface Descriptor:
>> bLength 31
>> bDescriptorType 36
>> bDescriptorSubtype 6 (EXTENSION_UNIT)
>> bUnitID 4
>>
>>
>> ideoControl Interface Descriptor:
>> bLength 9
>> bDescriptorType 36
>> bDescriptorSubtype 3 (OUTPUT_TERMINAL)
>> bTerminalID 4
>> wTerminalType 0x0101 USB Streaming
>> bAssocTerminal 0
>> bSourceID 3
>> iTerminal 0
>>
>> And that confuses the code. We have recently introduced a change that
>> has probably triggered the regression
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/media/usb/uvc?id=0e2ee70291e64a30fe36960c85294726d34a103e
>>
>> Do you know the commercial name of the device and if it is available to buy?
>>
>> Could you try this patch and let me know if it fixes the issue?
>>
>> diff --git a/drivers/media/usb/uvc/uvc_driver.c
>> b/drivers/media/usb/uvc/uvc_driver.c
>> index fa61f1d0ea2c..81937501fb0c 100644
>> --- a/drivers/media/usb/uvc/uvc_driver.c
>> +++ b/drivers/media/usb/uvc/uvc_driver.c
>> @@ -167,11 +167,23 @@ static struct uvc_entity
>> *uvc_entity_by_reference(struct uvc_device *dev,
>>
>> static struct uvc_streaming *uvc_stream_by_id(struct uvc_device *dev, int id)
>> {
>> - struct uvc_streaming *stream;
>> + struct uvc_streaming *stream, *last_entry;
>> + unsigned int count = 0;
>>
>> list_for_each_entry(stream, &dev->streams, list) {
>> if (stream->header.bTerminalLink == id)
>> return stream;
>> + count += 1;
>> + last_entry = stream;
>> + }
>> +
>> + /*
>> + * If the streaming entity has an invalid id, but it is the only
>> + * one available, use it.
>> + */
>> + if (count == 1 && id == UVC_INVALID_ENTITY_ID) {
>> + dev_err(&dev->intf->dev, "Heuristics triggered\n");
>> + return last_entry;
>> }
>>
>> return NULL;
>>
>>
>> Thanks
prev parent reply other threads:[~2025-10-09 9:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-08 12:56 [REGRESSION] uvcvideo: Grandstream GUV3100 (2bab:0011) broken on recent kernels (including LTS) Angel4005
2025-10-08 23:16 ` Bagas Sanjaya
2025-10-09 6:50 ` Michal Pecio
2025-10-09 6:55 ` Ricardo Ribalda
2025-10-09 9:22 ` Angel4005
2025-10-09 9:29 ` Laurent Pinchart
2025-10-09 9:44 ` Angel4005
2025-10-09 9:59 ` Hans de Goede [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b2ffa6cf-4d7e-48ca-94ce-2dd814a45692@kernel.org \
--to=hansg@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-uvc-devel@lists.sourceforge.net \
--cc=ooara1337@gmail.com \
--cc=ribalda@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox