From: Keith Busch <kbusch@kernel.org>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Keith Busch <kbusch@meta.com>,
linux-pci@vger.kernel.org, helgaas@kernel.org, alex@shazbot.org,
dan.j.williams@intel.com, Lukas Wunner <lukas@wunner.de>
Subject: Re: [PATCHv4 3/3] pci: make reset_subordinate hotplug safe
Date: Fri, 13 Feb 2026 07:34:21 -0700 [thread overview]
Message-ID: <aY82bXoCR43jQplq@kbusch-mbp> (raw)
In-Reply-To: <04516225-9967-fd1e-c756-6963719aa08d@linux.intel.com>
On Fri, Feb 13, 2026 at 09:32:32AM +0200, Ilpo Järvinen wrote:
> On Thu, 12 Feb 2026, Keith Busch wrote:
> > int pci_bus_error_reset(struct pci_dev *bridge)
> > {
> > - struct pci_bus *bus = bridge->subordinate;
> > - struct pci_slot *slot;
> > -
> > - if (!bus)
> > - return -ENOTTY;
> > -
> > - mutex_lock(&pci_slot_mutex);
> > - if (list_empty(&bus->slots))
> > - goto bus_reset;
> > -
> > - list_for_each_entry(slot, &bus->slots, list)
> > - if (pci_probe_reset_slot(slot))
> > - goto bus_reset;
> > -
> > - list_for_each_entry(slot, &bus->slots, list)
> > - if (pci_slot_reset(slot, PCI_RESET_DO_RESET))
> > - goto bus_reset;
> > -
> > - mutex_unlock(&pci_slot_mutex);
> > - return 0;
> > -bus_reset:
> > - mutex_unlock(&pci_slot_mutex);
> > - return pci_bus_reset(bridge->subordinate, PCI_RESET_DO_RESET);
> > + return pci_reset_bridge(bridge, PCI_RESET_NO_RESTORE);
> > }
>
> I think this should be moved down below pci_reset_bridge() and the forward
> declaration of pci_reset_bridge() removed.
Yes, thanks for the suggestion. A cleaner end result for sure.
prev parent reply other threads:[~2026-02-13 14:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-12 22:41 [PATCHv4 0/3] pci slot reset handling fixes Keith Busch
2026-02-12 22:41 ` [PATCHv4 1/3] pci: rename __pci_bus_reset and __pci_slot_reset Keith Busch
2026-02-12 22:41 ` [PATCHv4 2/3] pci: allow all bus devices to use the same slot Keith Busch
2026-02-13 7:26 ` Ilpo Järvinen
2026-02-13 14:10 ` Keith Busch
2026-02-13 7:27 ` Ilpo Järvinen
2026-02-12 22:41 ` [PATCHv4 3/3] pci: make reset_subordinate hotplug safe Keith Busch
2026-02-13 3:41 ` dan.j.williams
2026-02-13 7:32 ` Ilpo Järvinen
2026-02-13 14:34 ` Keith Busch [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=aY82bXoCR43jQplq@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=alex@shazbot.org \
--cc=dan.j.williams@intel.com \
--cc=helgaas@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=kbusch@meta.com \
--cc=linux-pci@vger.kernel.org \
--cc=lukas@wunner.de \
/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.