All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wen Xiong <wenxiong@linux.ibm.com>
To: Michal Pecio <michal.pecio@gmail.com>
Cc: mathias.nyman@intel.com, Bjorn Helgaas <bhelgaas@google.com>,
	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:41:17 -0500	[thread overview]
Message-ID: <eae289a8f872d508c1b3c411f69aec74@linux.ibm.com> (raw)
In-Reply-To: <20261028103616.29110069.michal.pecio@gmail.com>


> 
> 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
> 

Thanks for your reviewing!
Can we do?
if device is TI/0x8241 device, we just reset it in xhci-pci.c.
We don't need to bother other USB devices.

Thanks,
Wendy
> 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));
>> [...]

  reply	other threads:[~2026-10-28 15:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-21 16:06 [PATCH V3] xhci: Reset TI USB controller on xhci shutdown wenxiong
2026-10-21 16:16 ` sashiko-bot
2026-10-28  9:36 ` Michal Pecio
2026-10-28 15:41   ` Wen Xiong [this message]
2026-10-28 20:50   ` Wen Xiong

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=eae289a8f872d508c1b3c411f69aec74@linux.ibm.com \
    --to=wenxiong@linux.ibm.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=michal.pecio@gmail.com \
    --cc=stable@vger.kernel.org \
    --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 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.