Date: Thu, 12 Feb 2015 17:58:03 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278628 - stable/10/sys/dev/pci Message-ID: <201502121758.t1CHw3mP011653@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502121758.t1CHw3mP011653>