From: Pavel Machek <pavel@ucw.cz>
To: "Naüm Jumpertz" <n.jumpertz@protonmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Subject: Re: Oppo/Oneplus phones and usb3.0 incompatibility
Date: Mon, 24 Nov 2025 17:36:23 +0100 [thread overview]
Message-ID: <aSSJh+jbqZ+E1LP6@duo.ucw.cz> (raw)
In-Reply-To: <YhXrCm5ig-YWPY2OVkmdPl48N1Td6K8qJJ5cW7OtIMQt9ENXrexATCgeXCmuG5Mq1wIDxyhaLZhZeuW15lgKhKEKKLfU3GwjMMhKP1Awyj4=@protonmail.com>
[-- Attachment #1: Type: text/plain, Size: 3170 bytes --]
Hi!
> Because of wrong device descriptor, certain oppo/oneplus phones,
> like my oppo find x5, can't connect to linux computers using usb3 cables,
> the issue is also on other oppo/oneplus phones such as oneplus 9 pro,
> starting from OxygenOs 13 in december 2022
> link: https://xdaforums.com/t/connection-problems-to-a-computer-with-linux.4642402/
> The issue is present in kernel 6.17 but also in older versions.
> The connection correctly works using an usb2 cable.
>
> The phone is detected as a USB SuperSpeed device but the device descriptor flag given is USB 2.0,
> so, according to dmesg, the kernel warm reset the phone and don't manage to establishes the connection, which is annoying:
>
> [ 3537.701845] usb 2-2: new SuperSpeed USB device number 4 using xhci_hcd
> [ 3537.722594] usb 2-2: got a wrong device descriptor, warm reset device
> [ 3538.105960] usb 2-2: new SuperSpeed USB device number 5 using xhci_hcd
> [ 3538.126933] usb 2-2: got a wrong device descriptor, warm reset device
> [ 3538.313826] usb usb2-port2: attempt power cycle
> [ 3539.241985] usb 2-2: new SuperSpeed USB device number 6 using xhci_hcd
> [ 3539.262410] usb 2-2: got a wrong device descriptor, warm reset device
> [ 3539.646017] usb 2-2: new SuperSpeed USB device number 7 using xhci_hcd
> [ 3539.666993] usb 2-2: got a wrong device descriptor, warm reset device
> [ 3539.853713] usb usb2-port2: unable to enumerate USB device
>
> The issue is due to oppo phones not being conformant to usb standard.
> Maybe the kernel should still establish the connection if warm resets fail, by counting fails or something,
> otherwise oppo phones will never manage to connect through usb3.0 cables, until oppo fixes it.
>
> I'm not a dev, so my solution was just to disable the feature:
I'm afraid patch will not be acceptable like this, but you could be
able to put this behind some kind of blacklist.
Best regards,
Pavel
> drivers/usb/core/hub.c | 14 --------------
> 1 file changed, 14 deletions(-)
>
> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> index 256fe8c86828..be28296b39de 100644
> --- a/drivers/usb/core/hub.c
> +++ b/drivers/usb/core/hub.c
> @@ -5186,20 +5186,6 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1,
> *dev_descr = *descr;
> kfree(descr);
>
> - /*
> - * Some superspeed devices have finished the link training process
> - * and attached to a superspeed hub port, but the device descriptor
> - * got from those devices show they aren't superspeed devices. Warm
> - * reset the port attached by the devices can fix them.
> - */
> - if ((udev->speed >= USB_SPEED_SUPER) &&
> - (le16_to_cpu(udev->descriptor.bcdUSB) < 0x0300)) {
> - dev_err(&udev->dev, "got a wrong device descriptor, warm reset device\n");
> - hub_port_reset(hub, port1, udev, HUB_BH_RESET_TIME, true);
> - retval = -EINVAL;
> - goto fail;
> - }
> -
> usb_detect_quirks(udev);
>
> if (le16_to_cpu(udev->descriptor.bcdUSB) >= 0x0201) {
--
I don't work for Nazis and criminals, and neither should you.
Boycott Putin, Trump, Netanyahu and Musk!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
prev parent reply other threads:[~2025-11-24 16:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 20:47 Naüm Jumpertz
2025-11-24 16:36 ` Pavel Machek [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=aSSJh+jbqZ+E1LP6@duo.ucw.cz \
--to=pavel@ucw.cz \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=n.jumpertz@protonmail.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
all inboxes | Powered by JetHome®