acpi_pci.c (129829) | acpi_pci.c (130208) |
---|---|
1/* 2 * Copyright (c) 1997, Stefan Esser <se@freebsd.org> 3 * Copyright (c) 2000, Michael Smith <msmith@freebsd.org> 4 * Copyright (c) 2000, BSDi 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 13 unchanged lines hidden (view full) --- 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1997, Stefan Esser <se@freebsd.org> 3 * Copyright (c) 2000, Michael Smith <msmith@freebsd.org> 4 * Copyright (c) 2000, BSDi 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 13 unchanged lines hidden (view full) --- 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_pci.c 129829 2004-05-29 04:32:50Z njl $"); | 30__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_pci.c 130208 2004-06-07 21:39:15Z njl $"); |
31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/bus.h> 35#include <sys/kernel.h> 36#include <sys/malloc.h> 37#include <sys/module.h> 38 --- 149 unchanged lines hidden (view full) --- 188 * power state. 189 */ 190 old_state = pci_get_powerstate(child); 191 if (old_state < state) { 192 error = pci_set_powerstate_method(dev, child, state); 193 if (error) 194 return (error); 195 } | 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/bus.h> 35#include <sys/kernel.h> 36#include <sys/malloc.h> 37#include <sys/module.h> 38 --- 149 unchanged lines hidden (view full) --- 188 * power state. 189 */ 190 old_state = pci_get_powerstate(child); 191 if (old_state < state) { 192 error = pci_set_powerstate_method(dev, child, state); 193 if (error) 194 return (error); 195 } |
196 h = acpi_get_handle(child); 197 if (h != NULL) { 198 status = acpi_pwr_switch_consumer(h, acpi_state); 199 if (ACPI_FAILURE(status)) 200 device_printf(dev, 201 "Failed to set ACPI power state D%d on %s: %s\n", 202 acpi_state, device_get_nameunit(child), 203 AcpiFormatException(status)); 204 } | 196 h = acpi_get_handle(dev); 197 status = acpi_pwr_switch_consumer(h, acpi_state); 198 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) 199 device_printf(dev, 200 "Failed to set ACPI power state D%d on %s: %s\n", 201 acpi_state, acpi_name(h), AcpiFormatException(status)); |
205 if (old_state > state) 206 return (pci_set_powerstate_method(dev, child, state)); 207 else 208 return (0); 209} 210 211static ACPI_STATUS 212acpi_pci_save_handle(ACPI_HANDLE handle, UINT32 level, void *context, --- 71 unchanged lines hidden --- | 202 if (old_state > state) 203 return (pci_set_powerstate_method(dev, child, state)); 204 else 205 return (0); 206} 207 208static ACPI_STATUS 209acpi_pci_save_handle(ACPI_HANDLE handle, UINT32 level, void *context, --- 71 unchanged lines hidden --- |