summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/subr_bus.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
index b19be54..5610f38 100644
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -3597,6 +3597,18 @@ bus_child_location_str(device_t child, char *buf, size_t buflen)
return (BUS_CHILD_LOCATION_STR(parent, child, buf, buflen));
}
+/* Resume all devices and then notify userland that we're up again. */
+static int
+root_resume(device_t dev)
+{
+ int error;
+
+ error = bus_generic_resume(dev);
+ if (error == 0)
+ devctl_notify("kern", "power", "resume", NULL);
+ return (error);
+}
+
static int
root_print_child(device_t dev, device_t child)
{
@@ -3635,7 +3647,7 @@ static kobj_method_t root_methods[] = {
/* Device interface */
KOBJMETHOD(device_shutdown, bus_generic_shutdown),
KOBJMETHOD(device_suspend, bus_generic_suspend),
- KOBJMETHOD(device_resume, bus_generic_resume),
+ KOBJMETHOD(device_resume, root_resume),
/* Bus interface */
KOBJMETHOD(bus_print_child, root_print_child),
OpenPOWER on IntegriCloud