From: Michal Pecio <michal.pecio@gmail.com>
To: wenxiong@linux.ibm.com, mathias.nyman@intel.com,
Bjorn Helgaas <bhelgaas@google.com>
Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
wenxiong@us.ibm.com, linux-pci@vger.kernel.org
Subject: Re: [PATCH V3] xhci: Reset TI USB controller on xhci shutdown
Date: Wed, 28 Oct 2026 10:36:16 +0100 [thread overview]
Message-ID: <20261028103616.29110069.michal.pecio@gmail.com> (raw)
In-Reply-To: <20261021160608.8229-1-wenxiong@linux.ibm.com>
On Wed, 21 Oct 2026 12:06:08 -0400, wenxiong@linux.ibm.com wrote:
> From: Wen Xiong <wenxiong@linux.ibm.com>
>
> Fixes kexec boot. Without a hard reset, TI pci usb chips will fail to
> initialize in a kexec booted kernel.
>
> Signed-off-by: Wen Xiong <wenxiong@linux.ibm.com>
[ Adding linux-pci and Bjorn Helgaas ]
I tried to make this code a bit more "proper", by moving the
pci_reset_function_locked() call to xhci-pci.c from xhci.c.
I found that when I actually run this, I get a warning from PCI:
unlocked secondary bus reset via: __pci_reset_function_locked
Bjorn, any tips what would be a proper way to whack a malfunctioning
PCI device with a heavy hammer to ensure it will work after kexec?
Seems we have pci_reset_function(), which locks the parent bridge for
us, but it also preserves some "state". Do we want that?
I'm also starting to wonder if we shouldn't do this reset after kexec,
to cover for kdump. Or maybe both, because shutdown() is supposed to
quiesce the chip and keep it from doing DMA, and we have no idea what
such chip is doing (if anything) when it refuses to halt.
Thanks,
Michal
> [...]
> + /*
> + * TI xHCI controllers fail to initialize in a kexec
> + * kernel without a PCI function reset
> + */
> + if (err && (xhci->quirks & XHCI_RESET_ON_SHUTDOWN))
> + pci_reset_function_locked(to_pci_dev(hcd->self.sysdev));
> [...]
prev parent reply other threads:[~2026-10-28 9:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 16:06 wenxiong
2026-10-28 9:36 ` Michal Pecio [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=20261028103616.29110069.michal.pecio@gmail.com \
--to=michal.pecio@gmail.com \
--cc=bhelgaas@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=stable@vger.kernel.org \
--cc=wenxiong@linux.ibm.com \
--cc=wenxiong@us.ibm.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
all inboxes | Powered by JetHome®