Deleted Added
full compact
acpi_pci.c (214072) acpi_pci.c (214110)
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 214072 2010-10-19 19:53:06Z jkim $");
30__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_pci.c 214110 2010-10-20 16:47:09Z jkim $");
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

--- 135 unchanged lines hidden (view full) ---

174 * first shut it down using PCI, and then using ACPI, which lets ACPI
175 * try to power down any Power Resources that are now no longer used.
176 * When powering up a device, we let ACPI set the state first so that
177 * it can enable any needed Power Resources before changing the PCI
178 * power state.
179 */
180 ACPI_SERIAL_BEGIN(pci_powerstate);
181 old_state = pci_get_powerstate(child);
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

--- 135 unchanged lines hidden (view full) ---

174 * first shut it down using PCI, and then using ACPI, which lets ACPI
175 * try to power down any Power Resources that are now no longer used.
176 * When powering up a device, we let ACPI set the state first so that
177 * it can enable any needed Power Resources before changing the PCI
178 * power state.
179 */
180 ACPI_SERIAL_BEGIN(pci_powerstate);
181 old_state = pci_get_powerstate(child);
182 if (old_state < state) {
182 if (old_state < state && pci_do_power_suspend) {
183 error = pci_set_powerstate_method(dev, child, state);
184 if (error)
185 goto out;
186 }
187 h = acpi_get_handle(child);
188 status = acpi_pwr_switch_consumer(h, state);
189 if (ACPI_SUCCESS(status)) {
190 if (bootverbose)

--- 134 unchanged lines hidden ---
183 error = pci_set_powerstate_method(dev, child, state);
184 if (error)
185 goto out;
186 }
187 h = acpi_get_handle(child);
188 status = acpi_pwr_switch_consumer(h, state);
189 if (ACPI_SUCCESS(status)) {
190 if (bootverbose)

--- 134 unchanged lines hidden ---