diff options
author | dchagin <dchagin@FreeBSD.org> | 2014-11-19 11:05:45 +0000 |
---|---|---|
committer | dchagin <dchagin@FreeBSD.org> | 2014-11-19 11:05:45 +0000 |
commit | af58768fe93c86956af565c332afbcc9c3218f73 (patch) | |
tree | 48b7c4eddac1461c698de88538ead1706c98a08c /sys | |
parent | 2f756a08ea6b9666544be232a34f93fbf3d90b3f (diff) | |
download | FreeBSD-src-af58768fe93c86956af565c332afbcc9c3218f73.zip FreeBSD-src-af58768fe93c86956af565c332afbcc9c3218f73.tar.gz |
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.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/pci.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 8e6b87b..d2ac111 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -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_t child, int state) * 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); } |