From: Keith Busch <keith.busch@intel.com>
To: Linux PCI <linux-pci@vger.kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Sinan Kaya <okaya@kernel.org>, Thomas Tai <thomas.tai@oracle.com>,
poza@codeaurora.org, Lukas Wunner <lukas@wunner.de>,
Christoph Hellwig <hch@lst.de>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Keith Busch <keith.busch@intel.com>
Subject: [PATCHv3 01/10] PCI/portdrv: Use subsys_init for service drivers
Date: Tue, 18 Sep 2018 17:56:53 -0600 [thread overview]
Message-ID: <20180918235702.26573-2-keith.busch@intel.com> (raw)
In-Reply-To: <20180918235702.26573-1-keith.busch@intel.com>
The PCI port driver saves the PCI state after initializing all the
service devices. This was, however, before the service drivers were even
registered. The config space state that the service drivers were setting
up were not being saved.
This patch fixes this by changing the service drivers use the
subsys_init, which gets the service drivers registered after the pci bus
system is initialized, but before the pci devices are probed. This gets
the state saved as expected.
Note, 70626d88385 ("PCI: pciehp: Make explicitly non-modular") already
mentioned this exact change should be done, but declined to at the time
until there was a real need for it.
Signed-off-by: Keith Busch <keith.busch@intel.com>
---
drivers/pci/hotplug/pciehp_core.c | 2 +-
drivers/pci/pcie/aer.c | 2 +-
drivers/pci/pcie/dpc.c | 2 +-
drivers/pci/pcie/pme.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
index ccaf01e6eced..334044814dbe 100644
--- a/drivers/pci/hotplug/pciehp_core.c
+++ b/drivers/pci/hotplug/pciehp_core.c
@@ -322,4 +322,4 @@ static int __init pcied_init(void)
return retval;
}
-device_initcall(pcied_init);
+subsys_initcall(pcied_init);
diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
index 83180edd6ed4..1d2159409b01 100644
--- a/drivers/pci/pcie/aer.c
+++ b/drivers/pci/pcie/aer.c
@@ -1575,4 +1575,4 @@ static int __init aer_service_init(void)
return -ENXIO;
return pcie_port_service_register(&aerdriver);
}
-device_initcall(aer_service_init);
+subsys_initcall(aer_service_init);
diff --git a/drivers/pci/pcie/dpc.c b/drivers/pci/pcie/dpc.c
index f03279fc87cd..aacfb50eccfc 100644
--- a/drivers/pci/pcie/dpc.c
+++ b/drivers/pci/pcie/dpc.c
@@ -286,4 +286,4 @@ static int __init dpc_service_init(void)
{
return pcie_port_service_register(&dpcdriver);
}
-device_initcall(dpc_service_init);
+subsys_initcall(dpc_service_init);
diff --git a/drivers/pci/pcie/pme.c b/drivers/pci/pcie/pme.c
index 3ed67676ea2a..cd8c1adb9b0a 100644
--- a/drivers/pci/pcie/pme.c
+++ b/drivers/pci/pcie/pme.c
@@ -450,4 +450,4 @@ static int __init pcie_pme_service_init(void)
{
return pcie_port_service_register(&pcie_pme_driver);
}
-device_initcall(pcie_pme_service_init);
+subsys_initcall(pcie_pme_service_init);
--
2.14.4
next prev parent reply other threads:[~2018-09-19 5:30 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-18 23:56 [PATCHv3 00/10] PCI error handling Keith Busch
2018-09-18 23:56 ` Keith Busch [this message]
2018-09-19 16:28 ` [PATCHv3 01/10] PCI/portdrv: Use subsys_init for service drivers Bjorn Helgaas
2018-09-19 17:05 ` Keith Busch
2018-09-19 18:00 ` Keith Busch
2018-09-19 19:40 ` Bjorn Helgaas
2018-09-19 20:17 ` Keith Busch
2018-09-18 23:56 ` [PATCHv3 02/10] PCI/portdrv: Restore pci state on slot reset Keith Busch
2018-09-18 23:56 ` [PATCHv3 03/10] PCI/AER: Take reference on error devices Keith Busch
2018-09-18 23:56 ` [PATCHv3 04/10] PCI/ERR: Use slot reset if available Keith Busch
2018-09-18 23:56 ` [PATCHv3 05/10] PCI/ERR: Handle fatal error recovery Keith Busch
2018-09-19 15:46 ` Bjorn Helgaas
2018-09-19 15:52 ` Keith Busch
2018-09-18 23:56 ` [PATCHv3 06/10] PCI/ERR: Always use the first downstream port Keith Busch
2018-09-18 23:56 ` [PATCHv3 07/10] PCI/ERR: Simplify broadcast callouts Keith Busch
2018-09-18 23:57 ` [PATCHv3 08/10] PCI/ERR: Report current recovery status for udev Keith Busch
2018-09-18 23:57 ` [PATCHv3 09/10] PCI: Unify device inaccessible Keith Busch
2018-09-25 1:10 ` Benjamin Herrenschmidt
2018-09-25 15:35 ` Keith Busch
2018-09-25 19:28 ` Benjamin Herrenschmidt
2025-04-18 3:55 ` Lukas Wunner
2018-09-18 23:57 ` [PATCHv3 10/10] PCI: Make link active reporting detection generic Keith Busch
2018-09-19 16:42 ` Sinan Kaya
2018-09-19 16:46 ` Sinan Kaya
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=20180918235702.26573-2-keith.busch@intel.com \
--to=keith.busch@intel.com \
--cc=benh@kernel.crashing.org \
--cc=bhelgaas@google.com \
--cc=hch@lst.de \
--cc=linux-pci@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=mika.westerberg@linux.intel.com \
--cc=okaya@kernel.org \
--cc=poza@codeaurora.org \
--cc=thomas.tai@oracle.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.