On Thu, Jun 21, 2018 at 07:17:03PM +0000, Vadim Pasternak wrote: > > > > -----Original Message----- > > From: Andrew Lunn [mailto:and...@lunn.ch] > > Sent: Thursday, June 21, 2018 9:35 PM > > To: Vadim Pasternak <vad...@mellanox.com>; Guenter Roeck <linux@roeck- > > us.net> > > Cc: da...@davemloft.net; netdev@vger.kernel.org; j...@resnulli.us > > Subject: Re: [PATCH v0 03/12] mlxsw: core: Add core environment module for > > port temperature reading > > > > > Hi Andrew, > > > > Adding Guenter Roeck, the HWMON maintainer. > > > > > The temperature of each individual module can be obtained through > > > ethtool. > > > > You mean via --module-info? > > Yes. > > > > > FYI: I plan to add hwmon support to the kernel SFP code. So if you ever > > decide to > > swap to the kernel SFP code, not your own, the raw temperatures will be > > exported. > > > > Not sure it'll work for us, since we read SFP/QSFP ports through our SW/FW > interface.
Can you make fake i2c busses? Pass the i2c transactions to the firmware? > But would be nice if you can provide some reference to this code. drivers/net/phy/sfp.c > > > > The worst temperature is necessary for the system cooling control > > > decision. > > > > I would expect the system cooling would understand that. > > > > In thermal zone infrastructure there is one temperature input. > How you can consider 64+ different inputs? I've never used the thermal zone code. But i've used boards with 4 sensors spread around it. If the thermal zone code could not support that, i would be surprised. [Goes away and reads https://www.kernel.org/doc/Documentation/thermal/sysfs-api.txt] So it sounds like, one zone is one sensor. So you actually have hot-plugable zones, up to 64 of them. It also looks like you can bind a zone to a cooling device. There does not seem to be a 1:1 mapping. So you should be able to bind 64 zones to one fan. Or if you have multiple fans, bind a zone to the nearest fan. But as i said, i'm no expert on this. You really should be posting these patches on the hwmon list and the linux-pm list. The netdev list does not have the needed specialist. Once Rui Zhang, Eduardo Valentin, and Guenter Roack have given them Acked-by, David Miller can then merge them. Andrew