[Very RFC 42/46] powernv/pci: Don't clear pdn->pe_number in pnv_pci_release_device
Alexey Kardashevskiy
aik at ozlabs.ru
Wed Nov 27 18:30:33 AEDT 2019
On 20/11/2019 12:28, Oliver O'Halloran wrote:
> Nothing looks at it anymore.
With a small extra step we can ditch it (compile tested):
https://github.com/aik/linux/commit/14db7061d48220354e83f8e100ab0cc1b7181da4
>
> Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
> ---
> arch/powerpc/platforms/powernv/pci-ioda.c | 12 ------------
> 1 file changed, 12 deletions(-)
>
> diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
> index d3e375d71cdc..45d940730c30 100644
> --- a/arch/powerpc/platforms/powernv/pci-ioda.c
> +++ b/arch/powerpc/platforms/powernv/pci-ioda.c
> @@ -3541,9 +3541,7 @@ static void pnv_ioda_release_pe(struct pnv_ioda_pe *pe)
>
> static void pnv_pci_release_device(struct pci_dev *pdev)
> {
> - struct pnv_phb *phb = pci_bus_to_pnvhb(pdev->bus);
> struct pnv_ioda_pe *pe = pnv_ioda_get_pe(pdev);
> - struct pci_dn *pdn = pci_get_pdn(pdev);
>
> /* The VF PE state is torn down when sriov_disable() is called */
> if (pdev->is_virtfn)
> @@ -3560,16 +3558,6 @@ static void pnv_pci_release_device(struct pci_dev *pdev)
> if (pdev->is_physfn)
> kfree(pdev->dev.archdata.iov_data);
>
> - /*
> - * PCI hotplug can happen as part of EEH error recovery. The @pdn
> - * isn't removed and added afterwards in this scenario. We should
> - * set the PE number in @pdn to an invalid one. Otherwise, the PE's
> - * device count is decreased on removing devices while failing to
> - * be increased on adding devices. It leads to unbalanced PE's device
> - * count and eventually make normal PCI hotplug path broken.
> - */
> - pdn->pe_number = IODA_INVALID_PE;
> -
> WARN_ON(--pe->device_count < 0);
> if (pe->device_count == 0)
> pnv_ioda_release_pe(pe);
>
--
Alexey
More information about the Linuxppc-dev
mailing list