Author: dchagin
Date: Wed Nov 19 11:05:45 2014
New Revision: 274707
URL: https://svnweb.freebsd.org/changeset/base/274707

Log:
  Revert r274635 as it's completely wrong.
  The parent of a pci dev device is a pciX device which do not
  implement the PCIB_POWER_FOR_SLEEP method from pcib_if.m.

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

Modified: head/sys/dev/pci/pci.c
==============================================================================
--- head/sys/dev/pci/pci.c      Wed Nov 19 10:25:08 2014        (r274706)
+++ head/sys/dev/pci/pci.c      Wed Nov 19 11:05:45 2014        (r274707)
@@ -3637,6 +3637,7 @@ static void
 pci_set_power_child(device_t dev, device_t child, int state)
 {
        struct pci_devinfo *dinfo;
+       device_t pcib;
        int dstate;
 
        /*
@@ -3646,10 +3647,11 @@ 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(dev, child, &dstate) == 0)
+           PCIB_POWER_FOR_SLEEP(pcib, child, &dstate) == 0)
                pci_set_powerstate(child, dstate);
 }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to