Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162635696
D55577.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D55577.diff
View Options
diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c
--- a/sys/dev/asmc/asmc.c
+++ b/sys/dev/asmc/asmc.c
@@ -51,6 +51,7 @@
#include <sys/rman.h>
#include <machine/resource.h>
+#include <netinet/in.h>
#include <contrib/dev/acpica/include/acpi.h>
@@ -935,11 +936,17 @@
{
struct asmc_softc *sc = device_get_softc(dev);
struct sysctl_ctx_list *sysctlctx;
+ uint8_t buf[6];
int i, error = 1;
- uint8_t buf[4];
sysctlctx = device_get_sysctl_ctx(dev);
+ error = asmc_key_read(dev, ASMC_KEY_REV, buf, 6);
+ if (error != 0)
+ goto out_err;
+ device_printf(dev, "SMC revision: %x.%x%x%x\n", buf[0], buf[1], buf[2],
+ ntohs(*(uint16_t *)buf + 4));
+
if (sc->sc_model->smc_sms_x == NULL)
goto nosms;
@@ -1039,10 +1046,10 @@
sc->sc_nkeys = 0;
}
+out_err:
#ifdef ASMC_DEBUG
asmc_dumpall(dev);
#endif
-
return (error);
}
diff --git a/sys/dev/asmc/asmcvar.h b/sys/dev/asmc/asmcvar.h
--- a/sys/dev/asmc/asmcvar.h
+++ b/sys/dev/asmc/asmcvar.h
@@ -78,6 +78,9 @@
/* Number of keys */
#define ASMC_NKEYS "#KEY" /* RO; 4 bytes */
+/* Query the ASMC revision */
+#define ASMC_KEY_REV "REV " /* RO: 6 bytes */
+
/*
* Fan control via SMC.
*/
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 16, 7:10 AM (20 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35128688
Default Alt Text
D55577.diff (1 KB)
Attached To
Mode
D55577: asmc: output the SMC revision on attach
Attached
Detach File
Event Timeline
Log In to Comment