View | Details | Raw Unified | Return to bug 43228 | Differences between
and this patch

Collapse All | Expand All

(-)linux/drivers/pci/pci-acpi.c (-1 / +1 lines)
Lines 223-229 static int acpi_pci_set_power_state(stru Link Here
223
		[PCI_D0] = ACPI_STATE_D0,
223
		[PCI_D0] = ACPI_STATE_D0,
224
		[PCI_D1] = ACPI_STATE_D1,
224
		[PCI_D1] = ACPI_STATE_D1,
225
		[PCI_D2] = ACPI_STATE_D2,
225
		[PCI_D2] = ACPI_STATE_D2,
226
		[PCI_D3hot] = ACPI_STATE_D3_HOT,
226
		[PCI_D3hot] = ACPI_STATE_D3,
227
		[PCI_D3cold] = ACPI_STATE_D3
227
		[PCI_D3cold] = ACPI_STATE_D3
228
	};
228
	};
229
	int error = -EINVAL;
229
	int error = -EINVAL;
(-)linux/drivers/acpi/bus.c (+4 lines)
Lines 273-278 static int __acpi_bus_set_power(struct a Link Here
273
		}
273
		}
274
	} else {
274
	} else {
275
		if (device->power.states[state].flags.explicit_set) {
275
		if (device->power.states[state].flags.explicit_set) {
276
			/* _PS3 should be executed for D3cold, not _PS4. */
277
			if (state == ACPI_STATE_D3_COLD)
278
				object_name[3] = '3';
279
276
			status = acpi_evaluate_object(device->handle,
280
			status = acpi_evaluate_object(device->handle,
277
						      object_name, NULL, NULL);
281
						      object_name, NULL, NULL);
278
			if (ACPI_FAILURE(status)) {
282
			if (ACPI_FAILURE(status)) {
(-)linux/drivers/acpi/scan.c (+4 lines)
Lines 908-913 static int acpi_bus_get_power_flags(stru Link Here
908
	device->power.states[ACPI_STATE_D3].flags.valid = 1;
908
	device->power.states[ACPI_STATE_D3].flags.valid = 1;
909
	device->power.states[ACPI_STATE_D3].power = 0;
909
	device->power.states[ACPI_STATE_D3].power = 0;
910
910
911
	/* Set D3cold's explicit_set flag if _PS3 exists. */
912
	if (device->power.states[ACPI_STATE_D3_HOT].flags.explicit_set)
913
		device->power.states[ACPI_STATE_D3_COLD].flags.explicit_set = 1;
914
911
	acpi_bus_init_power(device);
915
	acpi_bus_init_power(device);
912
916
913
	return 0;
917
	return 0;
(-)linux/drivers/acpi/power.c (-3 / +6 lines)
Lines 660-666 int acpi_power_on_resources(struct acpi_ Link Here
660
660
661
int acpi_power_transition(struct acpi_device *device, int state)
661
int acpi_power_transition(struct acpi_device *device, int state)
662
{
662
{
663
	int result;
663
	int result = 0;
664
664
665
	if (!device || (state < ACPI_STATE_D0) || (state > ACPI_STATE_D3_COLD))
665
	if (!device || (state < ACPI_STATE_D0) || (state > ACPI_STATE_D3_COLD))
666
		return -EINVAL;
666
		return -EINVAL;
Lines 679-686 int acpi_power_transition(struct acpi_de Link Here
679
	 * (e.g. so the device doesn't lose power while transitioning).  Then,
679
	 * (e.g. so the device doesn't lose power while transitioning).  Then,
680
	 * we dereference all power resources used in the current list.
680
	 * we dereference all power resources used in the current list.
681
	 */
681
	 */
682
	result = acpi_power_on_list(&device->power.states[state].resources);
682
	if (state < ACPI_STATE_D3_COLD)
683
	if (!result)
683
		result = acpi_power_on_list(
684
			&device->power.states[state].resources);
685
686
	if (!result && device->power.state < ACPI_STATE_D3_COLD)
684
		acpi_power_off_list(
687
		acpi_power_off_list(
685
			&device->power.states[device->power.state].resources);
688
			&device->power.states[device->power.state].resources);
686
689

Return to bug 43228