From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Forest <forestix@nom.one>
Cc: linux-usb@vger.kernel.org, regressions@lists.linux.dev,
stable@vger.kernel.org
Subject: Re: [REGRESSION] usb: xhci port capability storage change broke fastboot android bootloader utility
Date: Tue, 7 Jan 2025 14:29:35 +0200 [thread overview]
Message-ID: <3bd0e058-1aeb-4fc9-8b76-f0475eebbfe4@linux.intel.com> (raw)
In-Reply-To: <0l5mnj5hcmh2ev7818b3m0m7pokk73jfur@sonic.net>
On 6.1.2025 1.42, Forest wrote:
> On Thu, 2 Jan 2025 16:13:34 +0200, Mathias Nyman wrote:
>
>> It's not clear to me why this patch would cause regression.
>>
>> Could you enable xhci and usb core dynamic debug before connecting the
>> device, and then share dmesg after the issue is triggered.
>>
>> dmesg of a working case would also be good to have for comparison.
>
> I booted kernel 9b780c845fb6 (the last good one), logged in to my desktop,
> waited a couple of minutes to let things settle, and then ran 'fastboot
> getvar kernel' twice with the android device in bootloader mode.
> Here's the dmesg output:
Thanks for the logs.
Looks like we enable USB2 Link Power Management (LPM) in the failing case
>
> [ 226.002756] xhci_hcd 0000:0c:00.0: enable port 3 USB2 hardware LPM
> [ 226.002765] xhci_hcd 0000:0c:00.0: Set up evaluate context for LPM MEL change.
Does disabling USB2 hardware LPM for the device make it work again?
Adding USB_QUIRK_NO_LPM quirk "k" for your device vid:pid should do it.
i.e. add "usbcore.quirks=0fce:0dde:k" parameter to your kernel cmdline.
Or alternatively disable usb2 lpm during runtime via sysfs
(after enumeration, assuming device is "1-3" as in the log):
# echo 0 > /sys/bus/usb/devices/1-3/power/usb2_hardware_lpm
If those work then we need to figure out if we incorrectly try to enable
USB2 hardware LPM, or if device just can't handle LPM even if it claims
to be LPM capable.
Host hardware LPM capability can be checked from xhci reg-ext-protocol
fields from debugfs.
cat /sys/kernel/debug/usb/xhci/0000:0c:00.0/reg-ext-protocol:*
(please print content of _all_ reg_ext_protocol* files, LPM capability is
bit 19 of EXTCAP_PORTINFO)
Device USB2 LPM capability can be checked from the devices BOS descriptor,
visible (as sudo/root) with lsusb -v -d 0fce:0dde
Thanks
Mathias
next prev parent reply other threads:[~2025-01-07 12:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-27 21:59 [REGRESSION] usb: xhci port capability storage change broke fastboot android bootloader utility Forest
2025-01-02 14:13 ` Mathias Nyman
2025-01-05 23:42 ` Forest
2025-01-07 12:29 ` Mathias Nyman [this message]
2025-01-11 0:00 ` Forest
2025-01-13 15:05 ` Mathias Nyman
2025-01-15 1:38 ` Forest
2025-01-15 7:33 ` Greg KH
2025-01-24 19:44 ` Forest
2025-01-29 11:01 ` Mathias Nyman
2025-02-13 20:24 ` Salvatore Bonaccorso
2025-02-14 12:29 ` Mathias Nyman
2025-02-14 15:55 ` Salvatore Bonaccorso
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=3bd0e058-1aeb-4fc9-8b76-f0475eebbfe4@linux.intel.com \
--to=mathias.nyman@linux.intel.com \
--cc=forestix@nom.one \
--cc=linux-usb@vger.kernel.org \
--cc=regressions@lists.linux.dev \
--cc=stable@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).