summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2015-02-12 17:58:02 +0000
committerjhb <jhb@FreeBSD.org>2015-02-12 17:58:02 +0000
commit39fe100d12eef6aec1b703b2ec0f3a85cd2d5205 (patch)
treee809533c8b69f966baf94cebf936493a496ebb30 /sys/dev/pci
parentea4d7bbc3cfc71cdda8c7aad8d79f0d4db10d4fc (diff)
downloadFreeBSD-src-39fe100d12eef6aec1b703b2ec0f3a85cd2d5205.zip
FreeBSD-src-39fe100d12eef6aec1b703b2ec0f3a85cd2d5205.tar.gz
MFC 277710:
Pass a valid Dx state variable to PCIB_POWER_FOR_SLEEP() in pcib_resume() instead of NULL.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/pci_pci.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c
index 5fa886e..6457e81 100644
--- a/sys/dev/pci/pci_pci.c
+++ b/sys/dev/pci/pci_pci.c
@@ -933,11 +933,13 @@ int
pcib_resume(device_t dev)
{
device_t pcib;
+ int dstate;
if (pci_do_power_resume) {
pcib = device_get_parent(device_get_parent(dev));
- if (PCIB_POWER_FOR_SLEEP(pcib, dev, NULL) == 0)
- pci_set_powerstate(dev, PCI_POWERSTATE_D0);
+ dstate = PCI_POWERSTATE_D0;
+ if (PCIB_POWER_FOR_SLEEP(pcib, dev, &dstate) == 0)
+ pci_set_powerstate(dev, dstate);
}
pcib_cfg_restore(device_get_softc(dev));
return (bus_generic_resume(dev));
OpenPOWER on IntegriCloud