View | Details | Raw Unified | Return to bug 201239
Collapse All | Expand All

(-)sys/dev/acpica/acpi.c (-3 / +2 lines)
Lines 691-697 Link Here
691
static void
691
static void
692
acpi_set_power_children(device_t dev, int state)
692
acpi_set_power_children(device_t dev, int state)
693
{
693
{
694
	device_t child, parent;
694
	device_t child;
695
	device_t *devlist;
695
	device_t *devlist;
696
	struct pci_devinfo *dinfo;
696
	struct pci_devinfo *dinfo;
697
	int dstate, i, numdevs;
697
	int dstate, i, numdevs;
Lines 703-715 Link Here
703
	 * Retrieve and set D-state for the sleep state if _SxD is present.
703
	 * Retrieve and set D-state for the sleep state if _SxD is present.
704
	 * Skip children who aren't attached since they are handled separately.
704
	 * Skip children who aren't attached since they are handled separately.
705
	 */
705
	 */
706
	parent = device_get_parent(dev);
707
	for (i = 0; i < numdevs; i++) {
706
	for (i = 0; i < numdevs; i++) {
708
		child = devlist[i];
707
		child = devlist[i];
709
		dinfo = device_get_ivars(child);
708
		dinfo = device_get_ivars(child);
710
		dstate = state;
709
		dstate = state;
711
		if (device_is_attached(child) &&
710
		if (device_is_attached(child) &&
712
		    acpi_device_pwr_for_sleep(parent, dev, &dstate) == 0)
711
		    acpi_device_pwr_for_sleep(dev, child, &dstate) == 0)
713
			acpi_set_powerstate(child, dstate);
712
			acpi_set_powerstate(child, dstate);
714
	}
713
	}
715
	free(devlist, M_TEMP);
714
	free(devlist, M_TEMP);
(-)sys/dev/pci/pci.c (-1 / +1 lines)
Lines 3671-3677 Link Here
3671
		child = devlist[i];
3671
		child = devlist[i];
3672
		dstate = state;
3672
		dstate = state;
3673
		if (device_is_attached(child) &&
3673
		if (device_is_attached(child) &&
3674
		    PCIB_POWER_FOR_SLEEP(pcib, dev, &dstate) == 0)
3674
		    PCIB_POWER_FOR_SLEEP(pcib, child, &dstate) == 0)
3675
			pci_set_powerstate(child, dstate);
3675
			pci_set_powerstate(child, dstate);
3676
	}
3676
	}
3677
}
3677
}

Return to bug 201239