From: Pierre-David Belanger <pierredavidbelanger@gmail.com>
To: Shixiong Ou <oushixiong1025@163.com>
Cc: Pierre-David Belanger <pierredavidbelanger@gmail.com>,
Shixiong Ou <oushixiong@kylinos.cn>,
Mathias Nyman <mathias.nyman@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Niklas Neronin <niklas.neronin@linux.intel.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
regressions@lists.linux.dev
Subject: Re: [PATCH] usb: xhci: fix maximum event ring segments calculation
Date: Sat, 29 Aug 2026 23:12:32 -0400 [thread overview]
Message-ID: <20260830031233.1810986-2-pierredavidbelanger@gmail.com> (raw)
In-Reply-To: <20260828105926.930033-1-oushixiong1025@163.com>
I ran into this independently on x86_64 under QEMU and had a regression
report half written when I found your patch. Same one line, same reasoning.
Confirmed against vanilla mainline 08dbfad3f504, with v7.2 built from the same
config for comparison:
v7.2 (8d3ae59288f1) USB keyboard enumerates
08dbfad3f504 xhci_hcd does not probe
08dbfad3f504 + this patch USB keyboard enumerates again
The failure on 08dbfad3f504:
xhci_hcd 0000:00:04.0: xHCI Host Controller
xhci_hcd 0000:00:04.0: new USB bus registered, assigned bus number 1
xhci_hcd 0000:00:04.0: Failed to allocate interrupter erst
xhci_hcd 0000:00:04.0: can't setup: -12
xhci_hcd 0000:00:04.0: USB bus 1 deregistered
xhci_hcd 0000:00:04.0: init 0000:00:04.0 fail, -12
xhci_hcd 0000:00:04.0: probe with driver xhci_hcd failed with error -12
Reproduced with:
qemu-system-x86_64 -enable-kvm -m 512 -display none -serial stdio \
-kernel bzImage -initrd initrd \
-device qemu-xhci -device usb-kbd
Both -device qemu-xhci and -device nec-usb-xhci are affected. Reading
HCSPARAMS2 from inside the guest gives 0x0000000f, so ERST Max really is 0
and max_segs comes out as 0 with the current code.
I did not see the page allocator WARNING you hit (my .config is a minimal
tinyconfig-derived one), but the probe failure and the -12 are identical,
and this patch fixes it.
Tested-by: Pierre-David Belanger <pierredavidbelanger@gmail.com>
Thanks for the quick fix.
Pierre-David
next prev parent reply other threads:[~2026-08-30 3:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-28 10:59 oushixiong1025
2026-08-30 3:12 ` Pierre-David Belanger [this message]
2026-08-31 6:55 ` Thorsten Leemhuis
2026-08-31 9:21 ` Mathias Nyman
2026-08-31 11:28 ` Thorsten Leemhuis
2026-08-31 11:36 ` Thorsten Leemhuis
2026-08-31 14:28 ` Mathias Nyman
2026-09-01 8:16 ` Thorsten Leemhuis
2026-08-31 9:10 ` Mathias Nyman
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=20260830031233.1810986-2-pierredavidbelanger@gmail.com \
--to=pierredavidbelanger@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=niklas.neronin@linux.intel.com \
--cc=oushixiong1025@163.com \
--cc=oushixiong@kylinos.cn \
--cc=regressions@lists.linux.dev \
/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®