From: davidcs Date: Mon, 12 Oct 2015 20:21:17 +0000 (+0000) Subject: Add support for reading device temperature X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=e779ea6de217fb56ace1c5c0ea11a1893369dc4e;p=people%2Fjulieng%2Ffreebsd.git Add support for reading device temperature MFC after:5 days --- diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c index 274cc5b4ca3e..dd994be0cde6 100644 --- a/sys/dev/bxe/bxe.c +++ b/sys/dev/bxe/bxe.c @@ -16122,9 +16122,12 @@ bxe_sysctl_state(SYSCTL_HANDLER_ARGS) } if (result == 1) { + uint32_t temp; sc = (struct bxe_softc *)arg1; + BLOGI(sc, "... dumping driver state ...\n"); - /* XXX */ + temp = SHMEM2_RD(sc, temperature_in_half_celsius); + BLOGI(sc, "\t Device Temperature = %d Celsius\n", (temp/2)); } return (error);