From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vadim Pasternak Subject: RE: [PATCH v0 03/12] mlxsw: core: Add core environment module for port temperature reading Date: Thu, 21 Jun 2018 20:02:12 +0000 Message-ID: References: <1529594883-20619-1-git-send-email-vadimp@mellanox.com> <1529594883-20619-4-git-send-email-vadimp@mellanox.com> <20180621171120.GA6830@lunn.ch> <20180621183440.GA10038@lunn.ch> <20180621194917.GC10038@lunn.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: Guenter Roeck , "davem@davemloft.net" , "netdev@vger.kernel.org" , "jiri@resnulli.us" To: Andrew Lunn Return-path: Received: from mail-ve1eur01on0046.outbound.protection.outlook.com ([104.47.1.46]:62081 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753970AbeFUUCP (ORCPT ); Thu, 21 Jun 2018 16:02:15 -0400 In-Reply-To: <20180621194917.GC10038@lunn.ch> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: > -----Original Message----- > From: Andrew Lunn [mailto:andrew@lunn.ch] > Sent: Thursday, June 21, 2018 10:49 PM > To: Vadim Pasternak > Cc: Guenter Roeck ; davem@davemloft.net; > netdev@vger.kernel.org; jiri@resnulli.us > Subject: Re: [PATCH v0 03/12] mlxsw: core: Add core environment module fo= r > port temperature reading >=20 > On Thu, Jun 21, 2018 at 07:17:03PM +0000, Vadim Pasternak wrote: > > > > > > > -----Original Message----- > > > From: Andrew Lunn [mailto:andrew@lunn.ch] > > > Sent: Thursday, June 21, 2018 9:35 PM > > > To: Vadim Pasternak ; Guenter Roeck > > > > > > Cc: davem@davemloft.net; netdev@vger.kernel.org; jiri@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. >=20 > Can you make fake i2c busses? Pass the i2c transactions to the firmware? Theoretically yes. But have well-defined SW/FW interface, working over PCI and FW at ASIC end implements I2C master. >=20 > > But would be nice if you can provide some reference to this code. >=20 > drivers/net/phy/sfp.c >=20 Thank you. > > > > > > 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? >=20 > I've never used the thermal zone code. But i've used boards with 4 sensor= s > spread around it. If the thermal zone code could not support that, i woul= d be > surprised. >=20 > [Goes away and reads > https://www.kernel.org/doc/Documentation/thermal/sysfs-api.txt] >=20 > So it sounds like, one zone is one sensor. So you actually have hot-pluga= ble > zones, up to 64 of them. It also looks like you can bind a zone to a cool= ing > 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 nea= rest fan. >=20 It means I will have 64 thermal zones for each module (actually for the some coming new systems will support 128 modules, plus thermal zone for ASIC ambient temperatures. And each zone will try to control same PWM. As I result PWM will be extremely jumpy and non-effective. > 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 n= eeded > specialist. Once Rui Zhang, Eduardo Valentin, and Guenter Roack have give= n > them Acked-by, David Miller can then merge them. Thanks, Vadim. >=20 > Andrew