From: "Neronin, Niklas" <niklas.neronin@linux.intel.com>
To: Youngjoon Lee <getfeus@gmail.com>,
Mathias Nyman <mathias.nyman@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: xhci: fix ERST max field conversion
Date: Thu, 27 Aug 2026 09:34:50 +0300 [thread overview]
Message-ID: <fdc17e7b-5b79-4b52-a1a9-929ec1565768@linux.intel.com> (raw)
In-Reply-To: <20260827053748.3755-1-getfeus@gmail.com>
On 27/08/2026 8.37, Youngjoon Lee wrote:
> Commit 6d45e9556d4a ("usb: xhci: standardize multi bit-field
> macros") converted the ERST maximum calculation from BIT() to a
> left shift. These operations are not equivalent because the
> HCS_ERST_MAX field contains an exponent.
>
> On an MT8173 xHCI controller where HCS_ERST_MAX is zero, the new
> calculation produces zero event ring segments. This reaches
> dma_alloc_coherent() with a zero size, triggers a page allocator
> warning, and prevents xHCI from probing with -ENOMEM.
>
> Preserve the original calculation by applying BIT() to the value
> extracted with FIELD_GET().
>
> This restores the USB 2.0 and USB 3.0 root hubs on MT8173. A USB
> webcam and both USB 2.0 and USB 3.0 hubs enumerate successfully,
> and the previous ERST allocation failure is no longer present.
>
> Fixes: 6d45e9556d4a ("usb: xhci: standardize multi bit-field macros")
> Signed-off-by: Youngjoon Lee <getfeus@gmail.com>
Thanks for the report and patch.
This issue has already been addressed in:
https://lore.kernel.org/linux-usb/7e6648ad-7459-4248-8c6c-227cfc2586d8@linux.intel.com/
-Niklas
prev parent reply other threads:[~2026-08-27 6:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 5:37 [PATCH] usb: xhci: fix ERST max field conversion Youngjoon Lee
2026-08-27 6:34 ` Neronin, Niklas [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=fdc17e7b-5b79-4b52-a1a9-929ec1565768@linux.intel.com \
--to=niklas.neronin@linux.intel.com \
--cc=getfeus@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.