lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <BL0PR11MB3122D789FA8BEA693B4DD71DBDA6A@BL0PR11MB3122.namprd11.prod.outlook.com> Date: Thu, 2 Nov 2023 05:25:38 +0000 From: "Pucha, HimasekharX Reddy" <himasekharx.reddy.pucha@...el.com> To: "Knitter, Konrad" <konrad.knitter@...el.com>, "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org> CC: "jdelvare@...e.com" <jdelvare@...e.com>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "Knitter, Konrad" <konrad.knitter@...el.com>, "Joyner, Eric" <eric.joyner@...el.com>, Marcin Szycik <marcin.szycik@...ux.intel.com>, Marcin Domagala <marcinx.domagala@...el.com>, "Kitszel, Przemyslaw" <przemyslaw.kitszel@...el.com>, "linux@...ck-us.net" <linux@...ck-us.net> Subject: RE: [Intel-wired-lan] [PATCH iwl-next v5] ice: read internal temperature sensor > -----Original Message----- > From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of Konrad Knitter > Sent: Tuesday, October 24, 2023 4:31 PM > To: intel-wired-lan@...ts.osuosl.org > Cc: jdelvare@...e.com; netdev@...r.kernel.org; Knitter, Konrad <konrad.knitter@...el.com>; Joyner, Eric <eric.joyner@...el.com>; Marcin Szycik <marcin.szycik@...ux.intel.com>; Marcin Domagala <marcinx.domagala@...el.com>; Kitszel, Przemyslaw <przemyslaw.kitszel@...el.com>; linux@...ck-us.net > Subject: [Intel-wired-lan] [PATCH iwl-next v5] ice: read internal temperature sensor > > Since 4.30 firmware exposes internal thermal sensor reading via admin > queue commands. Expose those readouts via hwmon API when supported. > > Datasheet: > > Get Sensor Reading Command (Opcode: 0x0632) > > +--------------------+--------+--------------------+-------------------------+ > | Name | Bytes | Value | Remarks | > +--------------------+--------+--------------------+-------------------------+ > | Flags | 1-0 | | | > | Opcode | 2-3 | 0x0632 | Command opcode | > | Datalen | 4-5 | 0 | No external buffer. | > | Return value | 6-7 | | Return value. | > | Cookie High | 8-11 | Cookie | | > | Cookie Low | 12-15 | Cookie | | > | Sensor | 16 | | 0x00: Internal temp | > | | | | 0x01-0xFF: Reserved. | > | Format | 17 | Requested response | Only 0x00 is supported. | > | | | format | 0x01-0xFF: Reserved. | > | Reserved | 18-23 | | | > | Data Address high | 24-27 | Response buffer | | > | | | address | | > | Data Address low | 28-31 | Response buffer | | > | | | address | | > +--------------------+--------+--------------------+-------------------------+ > > Get Sensor Reading Response (Opcode: 0x0632) > > +--------------------+--------+--------------------+-------------------------+ > | Name | Bytes | Value | Remarks | > +--------------------+--------+--------------------+-------------------------+ > | Flags | 1-0 | | | > | Opcode | 2-3 | 0x0632 | Command opcode | > | Datalen | 4-5 | 0 | No external buffer | > | Return value | 6-7 | | Return value. | > | | | | EINVAL: Invalid | > | | | | parameters | > | | | | ENOENT: Unsupported | > | | | | sensor | > | | | | EIO: Sensor access | > | | | | error | > | Cookie High | 8-11 | Cookie | | > | Cookie Low | 12-15 | Cookie | | > | Sensor Reading | 16-23 | | Format of the reading | > | | | | is dependent on request | > | Data Address high | 24-27 | Response buffer | | > | | | address | | > | Data Address low | 28-31 | Response buffer | | > | | | address | | > +--------------------+--------+--------------------+-------------------------+ > > Sensor Reading for Sensor 0x00 (Internal Chip Temperature): > > +--------------------+--------+--------------------+-------------------------+ > | Name | Bytes | Value | Remarks | > +--------------------+--------+--------------------+-------------------------+ > | Thermal Sensor | 0 | | Reading in degrees | > | reading | | | Celsius. Signed int8 | > | Warning High | 1 | | Warning High threshold | > | threshold | | | in degrees Celsius. | > | | | | Unsigned int8. | > | | | | 0xFF when unsupported | > | Critical High | 2 | | Critical High threshold | > | threshold | | | in degrees Celsius. | > | | | | Unsigned int8. | > | | | | 0xFF when unsupported | > | Fatal High | 3 | | Fatal High threshold | > | threshold | | | in degrees Celsius. | > | | | | Unsigned int8. | > | | | | 0xFF when unsupported | > | Reserved | 4-7 | | | > +--------------------+--------+--------------------+-------------------------+ > > Driver provides current reading from HW as well as device specific > thresholds for thermal alarm (Warning, Critical, Fatal) events. > > $ sensors > > Output > ========================================================= > ice-pci-b100 > Adapter: PCI adapter > temp1: +62.0°C (high = +95.0°C, crit = +105.0°C) > (emerg = +115.0°C) > > Tested on Intel Corporation Ethernet Controller E810-C for SFP > > Co-developed-by: Marcin Domagala <marcinx.domagala@...el.com> > Signed-off-by: Marcin Domagala <marcinx.domagala@...el.com> > Co-developed-by: Eric Joyner <eric.joyner@...el.com> > Signed-off-by: Eric Joyner <eric.joyner@...el.com> > Reviewed-by: Marcin Szycik <marcin.szycik@...ux.intel.com> > Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@...el.com> > Signed-off-by: Konrad Knitter <konrad.knitter@...el.com> > --- > v5: additional documentation, fix CONFIG_ICE=y, CONFIG_HWMON=m > v4: added dependency config_hwmon, cleanups > v3: add SPDX identification to ice_hwmon files > v2: fix formmating issues, added hwmon maintainers to Cc > --- > drivers/net/ethernet/intel/Kconfig | 11 ++ > drivers/net/ethernet/intel/ice/Makefile | 1 + > drivers/net/ethernet/intel/ice/ice.h | 1 + > .../net/ethernet/intel/ice/ice_adminq_cmd.h | 28 ++++ > drivers/net/ethernet/intel/ice/ice_common.c | 54 +++++++- > drivers/net/ethernet/intel/ice/ice_common.h | 2 + > drivers/net/ethernet/intel/ice/ice_hwmon.c | 126 ++++++++++++++++++ > drivers/net/ethernet/intel/ice/ice_hwmon.h | 15 +++ > drivers/net/ethernet/intel/ice/ice_main.c | 5 + > drivers/net/ethernet/intel/ice/ice_type.h | 7 + > 10 files changed, 249 insertions(+), 1 deletion(-) > create mode 100644 drivers/net/ethernet/intel/ice/ice_hwmon.c > create mode 100644 drivers/net/ethernet/intel/ice/ice_hwmon.h > Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@...el.com> (A Contingent worker at Intel)
Powered by blists - more mailing lists