Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Apr 2015 21:56:44 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r281873 - head/sys/dev/pci
Message-ID:  <201504222156.t3MLuiuq067664@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Wed Apr 22 21:56:44 2015
New Revision: 281873
URL: https://svnweb.freebsd.org/changeset/base/281873

Log:
  Don't explicitly manage power states for PCI-PCI bridge devices in the
  driver's suspend and resume routines.  These have been redundant no-ops
  since r214065 changed the PCI bus driver to manage power states for
  all devices (including type 1/2 bridge devices) during suspend and resume.

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

Modified: head/sys/dev/pci/pci_pci.c
==============================================================================
--- head/sys/dev/pci/pci_pci.c	Wed Apr 22 21:47:51 2015	(r281872)
+++ head/sys/dev/pci/pci_pci.c	Wed Apr 22 21:56:44 2015	(r281873)
@@ -1101,32 +1101,15 @@ pcib_attach(device_t dev)
 int
 pcib_suspend(device_t dev)
 {
-	device_t	pcib;
-	int		dstate, error;
 
 	pcib_cfg_save(device_get_softc(dev));
-	error = bus_generic_suspend(dev);
-	if (error == 0 && pci_do_power_suspend) {
-		dstate = PCI_POWERSTATE_D3;
-		pcib = device_get_parent(device_get_parent(dev));
-		if (PCIB_POWER_FOR_SLEEP(pcib, dev, &dstate) == 0)
-			pci_set_powerstate(dev, dstate);
-	}
-	return (error);
+	return (bus_generic_suspend(dev));
 }
 
 int
 pcib_resume(device_t dev)
 {
-	device_t	pcib;
-	int dstate;
 
-	if (pci_do_power_resume) {
-		pcib = device_get_parent(device_get_parent(dev));
-		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?201504222156.t3MLuiuq067664>