Linux USB
 help / color / mirror / Atom feed
From: Xu Rao <raoxu@uniontech.com>
To: mathias.nyman@linux.intel.com
Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
	michal.pecio@gmail.com, niklas.neronin@linux.intel.com,
	raoxu@uniontech.com
Subject: [PATCH v2 0/4] usb: xhci: prepare MSI path for secondary interrupters
Date: Tue, 12 May 2026 11:14:54 +0800	[thread overview]
Message-ID: <4EB0C0803AAAF502+20260512031454.3892011-1-raoxu@uniontech.com> (raw)

Hi,

This series prepares the xHCI MSI path for secondary interrupters.

Instead of using struct usb_hcd as the MSI IRQ dev_id and deriving
interrupter 0 in the handler, pass struct xhci_interrupter as the IRQ
dev_id. This makes the MSI entry path operate on the same object that
owns the event ring and interrupter registers.

The primary path remains unchanged. Interrupter 0 is still the only
interrupter used by the normal xHCI path, and this series does not
enable extra vectors, change IRQ affinity, or add any new routing
policy.

USBSTS.EINT handling is also kept on interrupter 0. The bit is
controller-scoped, while IMAN.IP is per interrupter, so secondary
interrupters should not clear the controller-wide EINT status.

This is only a preparation step for future secondary interrupter users
and does not change the current primary xHCI interrupt behaviour.

Changes in v2:
- Patch 3 disables the primary interrupter before freeing the MSI IRQ,
  so the interrupt source is quiesced before releasing the vector.
- Patch 3 exports xhci_disable_interrupter() for xhci-pci module builds.

Xu Rao (4):
  usb: xhci: store xhci_hcd pointer in xhci_interrupter
  usb: xhci: route MSI through interrupter context
  usb: xhci-pci: use the interrupter entry as MSI dev_id
  usb: xhci: clear USBSTS EINT only for interrupter 0

 drivers/usb/host/xhci-mem.c  |  1 +
 drivers/usb/host/xhci-pci.c  |  9 +++++----
 drivers/usb/host/xhci.c      |  1 +
 drivers/usb/host/xhci-ring.c | 26 ++++++++++++++++++--------
 drivers/usb/host/xhci.h      |  1 +
 5 files changed, 26 insertions(+), 12 deletions(-)

--
2.50.1

             reply	other threads:[~2026-05-12  3:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12  3:14 Xu Rao [this message]
2026-05-12  3:18 ` [PATCH v2 1/4] usb: xhci: store xhci pointer in xhci_interrupter Xu Rao
2026-05-12  3:18 ` [PATCH v2 2/4] usb: xhci: route MSI through interrupter context Xu Rao
2026-05-12  3:18 ` [PATCH v2 3/4] usb: xhci-pci: use the interrupter entry as MSI dev_id Xu Rao
2026-05-12  3:19 ` [PATCH v2 4/4] usb: xhci: clear USBSTS EINT only for interrupter 0 Xu Rao

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=4EB0C0803AAAF502+20260512031454.3892011-1-raoxu@uniontech.com \
    --to=raoxu@uniontech.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@linux.intel.com \
    --cc=michal.pecio@gmail.com \
    --cc=niklas.neronin@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox