diff options
author | jhb <jhb@FreeBSD.org> | 2009-08-20 19:17:53 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2009-08-20 19:17:53 +0000 |
commit | 9b0755de9f1e9517732f96a37f0ef30b8db23811 (patch) | |
tree | ee9b2a74c07c732ee357d4810494c3b6aecd6e71 /sys/dev/acpica/acpi.c | |
parent | ab0b6203abac22f7fa981c24cf452d3dab032727 (diff) | |
download | FreeBSD-src-9b0755de9f1e9517732f96a37f0ef30b8db23811.zip FreeBSD-src-9b0755de9f1e9517732f96a37f0ef30b8db23811.tar.gz |
Temporarily revert the new-bus locking for 8.0 release. It will be
reintroduced after HEAD is reopened for commits by re@.
Approved by: re (kib), attilio
Diffstat (limited to 'sys/dev/acpica/acpi.c')
-rw-r--r-- | sys/dev/acpica/acpi.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index c3e4e52..63f95d3 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -675,6 +675,8 @@ acpi_suspend(device_t dev) device_t child, *devlist; int error, i, numdevs, pstate; + GIANT_REQUIRED; + /* First give child devices a chance to suspend. */ error = bus_generic_suspend(dev); if (error) @@ -717,6 +719,8 @@ acpi_resume(device_t dev) int i, numdevs, error; device_t child, *devlist; + GIANT_REQUIRED; + /* * Put all devices in D0 before resuming them. Call _S0D on each one * since some systems expect this. @@ -741,6 +745,8 @@ static int acpi_shutdown(device_t dev) { + GIANT_REQUIRED; + /* Allow children to shutdown first. */ bus_generic_shutdown(dev); @@ -2528,7 +2534,11 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state) thread_unlock(curthread); #endif - newbus_xlock(); + /* + * Be sure to hold Giant across DEVICE_SUSPEND/RESUME since non-MPSAFE + * drivers need this. + */ + mtx_lock(&Giant); slp_state = ACPI_SS_NONE; @@ -2601,7 +2611,7 @@ backout: if (slp_state >= ACPI_SS_SLEPT) acpi_enable_fixed_events(sc); - newbus_xunlock(); + mtx_unlock(&Giant); #ifdef SMP thread_lock(curthread); |