Skip to content
Commit b3c32c4f authored by Huang Ying's avatar Huang Ying Committed by Bjorn Helgaas
Browse files

PCI/PM: Fix proc config reg access for D3cold and bridge suspending



In https://bugzilla.kernel.org/show_bug.cgi?id=48981
Peter reported that /proc/bus/pci/??/??.? does not work for 3.6.
This is because the device configuration space registers are
not accessible if the corresponding parent bridge is suspended or
the device is put into D3cold state.

This is the same as /sys/bus/pci/devices/0000:??:??.?/config access
issue.  So the function used to solve sysfs issue is used to solve
this issue.

This patch moves pci_config_pm_runtime_get()/_put() from pci/pci-sysfs.c
to pci/pci.c and makes them extern so they can be used by both the
sysfs and proc paths.

[bhelgaas: changelog, references, reporters]
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=48981
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=49031
Reported-by: default avatarForrest Loomis <cybercyst@gmail.com>
Reported-by: default avatarPeter <lekensteyn@gmail.com>
Reported-by: default avatarMicael Dias <kam1kaz3@gmail.com>
Signed-off-by: default avatarHuang Ying <ying.huang@intel.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
CC: stable@vger.kernel.org		# v3.6+
parent 3ff2de9b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment