Re: [PATCH 1/2] PCI: Export pci_parent_bus_reset() for drivers to use

From: Maciej W. Rozycki

Date: Mon May 04 2026 - 20:08:19 EST


On Tue, 8 Aug 2023, Ilpo Järvinen wrote:

> > Index: linux-macro/drivers/pci/pci.c
> > ===================================================================
> > --- linux-macro.orig/drivers/pci/pci.c
> > +++ linux-macro/drivers/pci/pci.c
> > @@ -5149,7 +5149,19 @@ int pci_bridge_secondary_bus_reset(struc
> > }
> > EXPORT_SYMBOL_GPL(pci_bridge_secondary_bus_reset);
> >
> > -static int pci_parent_bus_reset(struct pci_dev *dev, bool probe)
> > +/**
> > + * pci_parent_bus_reset - Reset a device via its upstream PCI bridge
> > + * @dev: Device to reset.
> > + * @probe: Only check if reset is possible if TRUE, actually reset if FALSE.
> > + *
> > + * Perform a device reset by requesting a secondary bus reset via the
> > + * device's immediate upstream PCI bridge.
>
> > Return 0 if successful or
>
> Kernel doc has Return: section for return values.

No function description in this file follows this convention though. I
have now made the amendment requested anyway.

> > + * -ENOTTY if the reset failed or it could not have been issued in the
> > + * first place because the device is not on a secondary bus of any PCI
> > + * bridge or it wouldn't be the only device reset. If probing, then
> > + * only verify whether it would be possible to issue a reset.
>
> I guess most of the in-depth explanation about reasons why reset
> might not me issuable could go into the longer description block.

Likewise. Thanks for your review, v2 now posted at:
<https://lore.kernel.org/r/alpine.DEB.2.21.2605050051390.46195@xxxxxxxxxxxxxxxxx/>.

Maciej