svn commit: r278628 - stable/10/sys/dev/pci

John Baldwin jhb at FreeBSD.org
Thu Feb 12 17:58:03 UTC 2015


Author: jhb
Date: Thu Feb 12 17:58:02 2015
New Revision: 278628
URL: https://svnweb.freebsd.org/changeset/base/278628

Log:
  MFC 277710:
  Pass a valid Dx state variable to PCIB_POWER_FOR_SLEEP() in pcib_resume()
  instead of NULL.

Modified:
  stable/10/sys/dev/pci/pci_pci.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/pci/pci_pci.c
==============================================================================
--- stable/10/sys/dev/pci/pci_pci.c	Thu Feb 12 17:16:54 2015	(r278627)
+++ stable/10/sys/dev/pci/pci_pci.c	Thu Feb 12 17:58:02 2015	(r278628)
@@ -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));


More information about the svn-src-stable mailing list