Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/dm dm(8) doesn't cause problems on suspend, don't bl...



details:   https://anonhg.NetBSD.org/src/rev/91302e3fbdb6
branches:  trunk
changeset: 467167:91302e3fbdb6
user:      maya <maya%NetBSD.org@localhost>
date:      Thu Jan 16 07:18:08 2020 +0000

description:
dm(8) doesn't cause problems on suspend, don't block it.

Tested by Matthias Petermann, thanks!

diffstat:

 sys/dev/dm/device-mapper.c |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (28 lines):

diff -r 813cc6a46867 -r 91302e3fbdb6 sys/dev/dm/device-mapper.c
--- a/sys/dev/dm/device-mapper.c        Thu Jan 16 07:16:04 2020 +0000
+++ b/sys/dev/dm/device-mapper.c        Thu Jan 16 07:18:08 2020 +0000
@@ -1,4 +1,4 @@
-/*        $NetBSD: device-mapper.c,v 1.59 2019/12/22 13:16:09 tkusumi Exp $ */
+/*        $NetBSD: device-mapper.c,v 1.60 2020/01/16 07:18:08 maya Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -245,6 +245,9 @@
 static void
 dm_attach(device_t parent, device_t self, void *aux)
 {
+
+       if (!pmf_device_register(self, NULL, NULL))
+               aprint_error_dev(self, "couldn't establish power handler\n");
 }
 
 /*
@@ -259,6 +262,8 @@
 {
        dm_dev_t *dmv;
 
+       pmf_device_deregister(self);
+
        /* Detach device from global device list */
        if ((dmv = dm_dev_detach(self)) == NULL)
                return ENOENT;



Home | Main Index | Thread Index | Old Index