Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1581397
| From | Paul Gortmaker <paul.gortmaker@windriver.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] PCI/PME: Restore pcie_pme_driver.remove |
| Date | 2017-02-15 16:30 +0100 |
| Message-ID | <tb9GO-1II-21@gated-at.bofh.it> (permalink) |
| References | <tb0at-3NZ-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[[PATCH] PCI/PME: Restore pcie_pme_driver.remove] On 14/02/2017 (Tue 21:17) Yinghai Lu wrote:
> Found 4.9 and later, removing pci device for pcie port via /sys failed:
> ------------[ cut here ]------------
> kernel BUG at drivers/pci/msi.c:370!
>
[...]
> Bisect to commit d7def2040077 ("PCI/PME: Make explicitly non-modular").
> That commit did extra thing like remove the .remove for pcie_pme_driver.
Ah crap. Seems I mis-interpreted the use case of the .remove. :-/
Sorry about that.
Thanks,
Paul.
--
>
> Put back pcie_pme_remove and restore to pcie_pme_driver fix the problem.
>
> Fixes: d7def2040077 ("PCI/PME: Make explicitly non-modular")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
>
> diff --git a/drivers/pci/pcie/pme.c b/drivers/pci/pcie/pme.c
> index 7175293..2dd1c68 100644
> --- a/drivers/pci/pcie/pme.c
> +++ b/drivers/pci/pcie/pme.c
> @@ -433,6 +433,17 @@ static int pcie_pme_resume(struct pcie_device *srv)
> return 0;
> }
>
> +/**
> + * pcie_pme_remove - Prepare PCIe PME service device for removal.
> + * @srv - PCIe service device to remove.
> + */
> +static void pcie_pme_remove(struct pcie_device *srv)
> +{
> + pcie_pme_suspend(srv);
> + free_irq(srv->irq, srv);
> + kfree(get_service_data(srv));
> +}
> +
> static struct pcie_port_service_driver pcie_pme_driver = {
> .name = "pcie_pme",
> .port_type = PCI_EXP_TYPE_ROOT_PORT,
> @@ -441,6 +452,7 @@ static struct pcie_port_service_driver pcie_pme_driver = {
> .probe = pcie_pme_probe,
> .suspend = pcie_pme_suspend,
> .resume = pcie_pme_resume,
> + .remove = pcie_pme_remove,
> };
>
> /**
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] PCI/PME: Restore pcie_pme_driver.remove Yinghai Lu <yinghai@kernel.org> - 2017-02-15 06:20 +0100 Re: [PATCH] PCI/PME: Restore pcie_pme_driver.remove "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> - 2017-02-15 12:30 +0100 Re: [PATCH] PCI/PME: Restore pcie_pme_driver.remove Paul Gortmaker <paul.gortmaker@windriver.com> - 2017-02-15 16:30 +0100 Re: [PATCH] PCI/PME: Restore pcie_pme_driver.remove Bjorn Helgaas <helgaas@kernel.org> - 2017-02-15 17:10 +0100
csiph-web