git: 0307db7744d4 - main - acpi_spmc: Fail probe if acpi_spmc device already attached
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 01 Apr 2026 11:58:10 UTC
The branch main has been updated by obiwac:
URL: https://cgit.FreeBSD.org/src/commit/?id=0307db7744d4cfe0d610ebece226dd20fdcc4ed5
commit 0307db7744d4cfe0d610ebece226dd20fdcc4ed5
Author: Aymeric Wibo <obiwac@FreeBSD.org>
AuthorDate: 2026-04-01 11:54:57 +0000
Commit: Aymeric Wibo <obiwac@FreeBSD.org>
CommitDate: 2026-04-01 11:54:58 +0000
acpi_spmc: Fail probe if acpi_spmc device already attached
We cannot have more than one SPMC device.
Reviewed by: olce
Approved by: olce
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56062
---
sys/dev/acpica/acpi_spmc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/sys/dev/acpica/acpi_spmc.c b/sys/dev/acpica/acpi_spmc.c
index 206d3a843f53..0c2a5d9e96a9 100644
--- a/sys/dev/acpica/acpi_spmc.c
+++ b/sys/dev/acpica/acpi_spmc.c
@@ -190,6 +190,11 @@ acpi_spmc_probe(device_t dev)
if (ACPI_ID_PROBE(device_get_parent(dev), dev, spmc_ids, &name) > 0)
return (ENXIO);
+ if (device_get_unit(dev) > 0) {
+ device_printf(dev, "shouldn't have more than one SPMC");
+ return (ENXIO);
+ }
+
handle = acpi_get_handle(dev);
if (handle == NULL)
return (ENXIO);