Author: jhb
Date: Sun Jan 25 19:53:09 2015
New Revision: 277710
URL: https://svnweb.freebsd.org/changeset/base/277710

Log:
  Pass a valid Dx state variable to PCIB_POWER_FOR_SLEEP() in pcib_resume()
  instead of NULL.
  
  Submitted by: dchagin
  MFC after:    2 weeks

Modified:
  head/sys/dev/pci/pci_pci.c

Modified: head/sys/dev/pci/pci_pci.c
==============================================================================
--- head/sys/dev/pci/pci_pci.c  Sun Jan 25 19:45:44 2015        (r277709)
+++ head/sys/dev/pci/pci_pci.c  Sun Jan 25 19:53:09 2015        (r277710)
@@ -1114,11 +1114,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));
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to