]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: portdrv: Initialize service drivers directly
authorKeith Busch <keith.busch@intel.com>
Thu, 20 Sep 2018 16:27:06 +0000 (10:27 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 20 Sep 2018 17:05:54 +0000 (12:05 -0500)
commitadebaa4612d7f4f44105e98fbf3b6b0da854958d
treebe2916b0d37a15aca8580440aae8cabc4b03aa6f
parent7c1c2f9ecefb68b23225ae306ce41b4b3e4c9a7e
PCI: portdrv: Initialize service drivers directly

The PCI port driver saves the PCI state after initializing the device with
the applicable service devices.  This was, however, before the service
drivers were even registered because PCI probe happens before the
device_initcall initialized those service drivers.  The config space state
that the services set up were not being saved.  The end result would cause
PCI devices to not react to events that the drivers think they did if the
PCI state ever needed to be restored.

Fix this by changing the service drivers from using the init calls to
having the portdrv driver calling the services directly.  This will get the
state saved as desired, while making the relationship between the port
driver and the services under it more explicit in the code.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Sinan Kaya <okaya@kernel.org>
drivers/pci/hotplug/pciehp_core.c
drivers/pci/pcie/aer.c
drivers/pci/pcie/dpc.c
drivers/pci/pcie/pme.c
drivers/pci/pcie/portdrv.h
drivers/pci/pcie/portdrv_pci.c