Hi Elson, Sure, please finish it if you can. I had something urgent to do, postponed it and finally forgot... Thanks, Michal -----Original Message----- From: Elson Serrao <quic_eserrao@xxxxxxxxxxx> Sent: Tuesday, November 12, 2024 7:11 PM To: Vrastil, Michal <michal.vrastil@xxxxxxxxxxxxx>; Greg KH <greg@xxxxxxxxx> Cc: Vodicka, Michal <michal.vodicka@xxxxxxxxxxxxx>; balbi@xxxxxxxxxx; linux-usb@xxxxxxxxxxxxxxx; Vrastil, Michal <michal.vrastil@xxxxxxxxxxxxx>; stable@xxxxxxxxxx Subject: [EXT] Re: [PATCH] Revert "usb: gadget: composite: fix OS descriptors w_value [Some people who received this message don't often get email from quic_eserrao@xxxxxxxxxxx. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] CAUTION: This email is external. Do not click links or attachments that are unexpected or from unknown senders. If unsure, click the Report Phishing Button in Outlook. On 10/16/2024 4:55 PM, Elson Serrao wrote: > > > On 10/4/2024 6:33 AM, Greg KH wrote: >> On Fri, Sep 13, 2024 at 05:39:21PM +0200, Peter Korsgaard wrote: >>> On 9/11/24 03:32, Vodicka, Michal wrote: >>>>> Hmm, very odd. How are you testing this on the host side? >>>> >>>> We just attach the device and check the registry values created by >>>> OS for our device. As >>>> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\VID_XXXX&PID_YYYY&MI_NN\<device_instance>\Device Parameters. >>>> When it works our extended properties are created there. >>>> >>>> We check the communication using USB analyzer which clearly shows >>>> wValue bytes are in opposite order than documented. This is SETUP >>>> packet captured: >>>> >>>> Offset 0 1 2 3 4 5 6 7 >>>> 0x000 C1 A1 02 00 05 00 0A 00 >>>> >>>> As you can see, this is interface request and out interface number >>>> was >>>> 2 which is in the low byte of wValue. >>> >>> OK, annoying. I am traveling for conferences this/next week so I >>> cannot verify here, but presumably you are correct. Do you perhaps >>> have a more complete capture you can share? >>> >>> >>>> >>>>> Could it be that you are running into the WinUSB bug described here: >>>> >>>> No. The mentioned bug is in wIndex and out problem is wValue. Also, >>>> MSOS descriptors are read before WinUsb is even run. >>> >>> Ahh yes, indeed. >>> >>> >>>> What Windows version were you using and have you used USB analyzer >>>> to check the communication? >>> >>> It's been a while, but I believe Windows 10. In the end I ended up >>> shuffling the interfaces around so the one with the MSOS descriptors >>> was interface 0 for better compatibility, so it is possible that >>> something went wrong with my interface != 0 tests. >>> >>> If so, then I am fine with reverting, but we should probably add a >>> comment explaining that the documentation is wrong. >> >> Ok, Michal, can you add some text tothe changelog and send a v2 for >> this? >> > > HI Michal > > I am facing a similar issue where the Windows host is unable to fetch OS descriptor from the device running v6.9 kernel with Android mainline. Tested your patch and it fixes the issue. > > Host Machine: Windows10 22H2 > Composite device: NCM+Android Debugger (ADB) > Issue: Windows host is unable to fetch the OS descriptor for ADB interface and hence ADB functionality is failing. > > Also checked the USB analyzer output and it shows wValue bytes in > opposite order than documented i.e interface number is in the lower > bytes (for Extended Properties OS Desc) > HI Michal,Greg Since there has been no update for quite some time, would it be okay if I upload v2 with the feedback given ? This bug is impacting ADB enumeration on Qualcomm platforms, so would like to proceed with this fix. Thanks Elson