From: William Wu <william.wu@rock-chips.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
frank.wang@rock-chips.com, jianwei.zheng@rock-chips.com,
yue.long@rock-chips.com
Subject: Re: [PATCH] usb: gadget: configfs: Correctly set use_os_string at bind
Date: Mon, 25 Aug 2025 11:12:46 +0800 [thread overview]
Message-ID: <b62f3f22-d8a0-46ca-a261-fece95d6ae66@rock-chips.com> (raw)
In-Reply-To: <2025082244-celery-frenzy-2a70@gregkh>
On 8/22/2025 12:50 PM, Greg KH wrote:
> On Fri, Aug 22, 2025 at 11:36:09AM +0800, William Wu wrote:
>> Once the use_os_string flag is set to true for some functions
>> (e.g. adb/mtp) which need to response the OS string, and then
>> if we re-bind the ConfigFS gadget to use the other functions
>> (e.g. hid) which should not to response the OS string, however,
>> because the use_os_string flag is still true, so the usb gadget
>> response the OS string descriptor incorrectly, this can cause
>> the USB device to be unrecognizable on the Windows system.
>>
>> An example of this as follows:
>>
>> echo 1 > os_desc/use
>> ln -s functions/ffs.adb configs/b.1/function0
>> start adbd
>> echo "<udc device>" > UDC #succeed
>>
>> stop adbd
>> rm configs/b.1/function0
>> echo 0 > os_desc/use
>> ln -s functions/hid.gs0 configs/b.1/function0
>> echo "<udc device>" > UDC #fail to connect on Windows
>>
>> This patch sets the use_os_string flag to false at bind if
>> the functions not support OS Descriptors.
>>
>> Signed-off-by: William Wu <william.wu@rock-chips.com>
>
> What commit id does this fix?
Fixes: 87213d388e92 ("usb: gadget: configfs: OS String support")
Best Regards,
William Wu>
> thanks,
>
> greg k-h
>
>
prev parent reply other threads:[~2025-08-25 3:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-22 3:36 [PATCH] usb: gadget: configfs: Correctly set use_os_string at bind William Wu
2025-08-22 4:50 ` Greg KH
2025-08-25 3:12 ` William Wu [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=b62f3f22-d8a0-46ca-a261-fece95d6ae66@rock-chips.com \
--to=william.wu@rock-chips.com \
--cc=frank.wang@rock-chips.com \
--cc=gregkh@linuxfoundation.org \
--cc=jianwei.zheng@rock-chips.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=yue.long@rock-chips.com \
/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