NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/56825: No powermanagement support in amdsmn and amdccp preventing sleep
The following reply was made to PR kern/56825; it has been noted by GNATS.
From: Reinoud Zandijk <reinoud%NetBSD.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/56825: No powermanagement support in amdsmn and amdccp
preventing sleep
Date: Mon, 9 May 2022 16:05:43 +0200
Using the following patches providing minimal dummy PMF support the machine
seems to shutdown, syncing its discs etc, the screen goes blank but it just
resets into UEFI again.
> cvs -q -z1 diff -up sys/dev/ sys/arch/x86/
Index: sys/dev/acpi/amdccp_acpi.c
===================================================================
RCS file: /cvsroot/src/sys/dev/acpi/amdccp_acpi.c,v
retrieving revision 1.5
diff -u -p -r1.5 amdccp_acpi.c
--- sys/dev/acpi/amdccp_acpi.c 29 Jan 2021 15:49:55 -0000 1.5
+++ sys/dev/acpi/amdccp_acpi.c 9 May 2022 14:02:25 -0000
@@ -104,6 +104,9 @@ amdccp_acpi_attach(device_t parent, devi
amdccp_common_attach(sc);
+ if (!pmf_device_register(self, NULL, NULL))
+ aprint_error_dev(self, "couldn't establish power handler\n");
+
done:
acpi_resource_cleanup(&res);
}
Index: sys/dev/fdt/amdccp_fdt.c
===================================================================
RCS file: /cvsroot/src/sys/dev/fdt/amdccp_fdt.c,v
retrieving revision 1.6
diff -u -p -r1.6 amdccp_fdt.c
--- sys/dev/fdt/amdccp_fdt.c 27 Jan 2021 03:10:21 -0000 1.6
+++ sys/dev/fdt/amdccp_fdt.c 9 May 2022 14:02:26 -0000
@@ -89,4 +89,7 @@ amdccp_fdt_attach(device_t parent, devic
aprint_normal(": AMD CCP\n");
amdccp_common_attach(sc);
+
+ if (!pmf_device_register(self, NULL, NULL))
+ aprint_error_dev(self, "couldn't establish power handler\n");
}
Index: sys/dev/pci/amdccp_pci.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/amdccp_pci.c,v
retrieving revision 1.2
diff -u -p -r1.2 amdccp_pci.c
--- sys/dev/pci/amdccp_pci.c 25 Jun 2020 16:40:40 -0000 1.2
+++ sys/dev/pci/amdccp_pci.c 9 May 2022 14:02:26 -0000
@@ -116,4 +116,7 @@ amdccp_pci_attach(device_t parent, devic
}
amdccp_common_attach(sc);
+
+ if (!pmf_device_register(self, NULL, NULL))
+ aprint_error_dev(self, "couldn't establish power handler\n");
}
Index: sys/arch/x86/pci/amdsmn.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x86/pci/amdsmn.c,v
retrieving revision 1.13
diff -u -p -r1.13 amdsmn.c
--- sys/arch/x86/pci/amdsmn.c 27 Apr 2022 06:59:25 -0000 1.13
+++ sys/arch/x86/pci/amdsmn.c 9 May 2022 14:02:26 -0000
@@ -149,6 +149,10 @@ amdsmn_attach(device_t parent, device_t
// aprint_normal(": AMD Family 17h System Management Network\n");
aprint_normal(": AMD System Management Network\n");
+
+ if (!pmf_device_register(self, NULL, NULL))
+ aprint_error_dev(self, "couldn't establish power handler\n");
+
amdsmn_rescan(self, NULL, NULL);
}
@@ -168,6 +172,8 @@ amdsmn_detach(device_t self, int flags)
{
struct amdsmn_softc *sc = device_private(self);
+ pmf_device_deregister(self);
+
mutex_destroy(&sc->smn_lock);
aprint_normal_dev(self,"detach!\n");
Home |
Main Index |
Thread Index |
Old Index