Linux USB
 help / color / mirror / Atom feed
From: Michal Pecio <michal.pecio@gmail.com>
To: raoxu <raoxu@uniontech.com>
Cc: mathias.nyman@intel.com, gregkh@linuxfoundation.org,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Zhang Cen <rollkingzzc@gmail.com>,
	Niklas Neronin <niklas.neronin@linux.intel.com>
Subject: Re: [PATCH] usb: xhci: limit ports on the correct root hub
Date: Thu, 4 Jun 2026 08:51:36 +0200	[thread overview]
Message-ID: <20260604085136.6b20d2e8.michal.pecio@gmail.com> (raw)
In-Reply-To: <185F99CE35DA6675+20260604034818.2734932-1-raoxu@uniontech.com>

On Thu,  4 Jun 2026 11:48:18 +0800, raoxu wrote:
> From: Xu Rao <raoxu@uniontech.com>
> 
> xhci_create_rhub_port_array() is used for both USB2 and USB3
> root hubs. The limit path always writes usb3_rhub.num_ports.
> 
> When the helper limits the USB2 root hub, this leaves the passed
> root hub unchanged and modifies the wrong root hub instead.
> 
> Limit the root hub passed to the helper so the cap is applied to
> the root hub currently being initialized.
> 
> Fixes: 9a7ad750a8fb ("usb: xhci: move roothub port limit validation")
> Signed-off-by: Xu Rao <raoxu@uniontech.com>

Previous patch for the same bug, Cc its author and bad commit author.
https://lore.kernel.org/linux-usb/20260516033443.3646966-1-rollkingzzc@gmail.com/

I'm not sure how people keep discovering this issue - only by review
or are there really xHCI controllers with more than 31 USB 2.0 ports?
Should things be patched to support them properly?

Regards,
Michal

  reply	other threads:[~2026-06-04  6:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-04  3:48 [PATCH] usb: xhci: limit ports on the correct root hub raoxu
2026-06-04  6:51 ` Michal Pecio [this message]
2026-06-04  7:11   ` raoxu

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=20260604085136.6b20d2e8.michal.pecio@gmail.com \
    --to=michal.pecio@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=raoxu@uniontech.com \
    --cc=rollkingzzc@gmail.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