svn commit: r274635 - head/sys/dev/pci

Dmitry Chagin dchagin at FreeBSD.org
Mon Nov 17 20:25:22 UTC 2014


Author: dchagin
Date: Mon Nov 17 20:25:21 2014
New Revision: 274635
URL: https://svnweb.freebsd.org/changeset/base/274635

Log:
  Use the correct device as the power_for_sleep() method
  always pass request up to parent bridge.
  
  Reviewed by:	jhb
  MFC after:	1 week
  xMFC:		r274386,r274397

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

Modified: head/sys/dev/pci/pci.c
==============================================================================
--- head/sys/dev/pci/pci.c	Mon Nov 17 17:17:10 2014	(r274634)
+++ head/sys/dev/pci/pci.c	Mon Nov 17 20:25:21 2014	(r274635)
@@ -3637,7 +3637,6 @@ static void
 pci_set_power_child(device_t dev, device_t child, int state)
 {
 	struct pci_devinfo *dinfo;
-	device_t pcib;
 	int dstate;
 
 	/*
@@ -3647,11 +3646,10 @@ pci_set_power_child(device_t dev, device
 	 * device power.  Skip children who aren't attached since they
 	 * are handled separately.
 	 */
-	pcib = device_get_parent(dev);
 	dinfo = device_get_ivars(child);
 	dstate = state;
 	if (device_is_attached(child) &&
-	    PCIB_POWER_FOR_SLEEP(pcib, child, &dstate) == 0)
+	    PCIB_POWER_FOR_SLEEP(dev, child, &dstate) == 0)
 		pci_set_powerstate(child, dstate);
 }
 


More information about the svn-src-head mailing list