Hello Maya,many thanks for your response. I used the patch in my NetBSD 9.0 (RC1) kernel and rebuilt it. However, it does not seem to be the solution to the problem. If i want to send the system to sleep, the message still appears:
[ 92,499360] Devices without power management support: dm0 dm1For security, I have added additional logging - should that actually appear in the kernel log?
... static void dm_attach(device_t parent, device_t self, void *aux) { aprint_error("dm_attach called\n"); ... static int dm_detach(device_t self, int flags) { dm_dev_t *dmv; aprint_error("dm_detach called\n"); ...Since I don't see any of this in the log, I'm not sure at all whether the code is actually executed. Is it generally the case that all device drivers are "detached" before entering ACPI Sleep state 3? Or could this be a special case?
Best wishes Matthias On 14.01.20 07:13, maya%NetBSD.org@localhost wrote:
The pmf_device_register go appearing in most drivers is what is responsible for whitelisting drivers. So something like this might do. Index: device-mapper.c =================================================================== RCS file: /cvsroot/src/sys/dev/dm/device-mapper.c,v retrieving revision 1.59 diff -u -r1.59 device-mapper.c --- device-mapper.c 22 Dec 2019 13:16:09 -0000 1.59 +++ device-mapper.c 14 Jan 2020 06:13:17 -0000 @@ -245,6 +245,8 @@ 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 +261,8 @@ { dm_dev_t *dmv;+ pmf_device_deregister(self);+ /* Detach device from global device list */ if ((dmv = dm_dev_detach(self)) == NULL) return ENOENT;
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature