From owner-svn-src-stable-10@FreeBSD.ORG Thu Feb 12 17:58:03 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7188B24F; Thu, 12 Feb 2015 17:58:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CD553E1; Thu, 12 Feb 2015 17:58:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1CHw3l0011654; Thu, 12 Feb 2015 17:58:03 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CHw3mP011653; Thu, 12 Feb 2015 17:58:03 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502121758.t1CHw3mP011653@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 12 Feb 2015 17:58:03 +0000 (UTC) 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 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 17:58:03 -0000 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));