Re: [patch net-next v2 4/6] mlxsw: core: Implement temperature hwmon interface

2015-12-03 Thread Jiri Pirko
Thu, Dec 03, 2015 at 10:32:04AM CET, gerlitz...@gmail.com wrote: >On Thu, Dec 3, 2015 at 10:19 AM, Jiri Pirko wrote: >> Thu, Dec 03, 2015 at 12:37:58AM CET, da...@davemloft.net wrote: >>>From: Jiri Pirko >>>Date: Wed, 2 Dec 2015 23:35:31 +0100 >>> Why to continue to work if we know that we a

Re: [patch net-next v2 4/6] mlxsw: core: Implement temperature hwmon interface

2015-12-03 Thread Or Gerlitz
On Thu, Dec 3, 2015 at 10:19 AM, Jiri Pirko wrote: > Thu, Dec 03, 2015 at 12:37:58AM CET, da...@davemloft.net wrote: >>From: Jiri Pirko >>Date: Wed, 2 Dec 2015 23:35:31 +0100 >> >>> Why to continue to work if we know that we are making things wrong >>> (incorrect structure initialization in this

Re: [patch net-next v2 4/6] mlxsw: core: Implement temperature hwmon interface

2015-12-03 Thread Jiri Pirko
Thu, Dec 03, 2015 at 12:37:58AM CET, da...@davemloft.net wrote: >From: Jiri Pirko >Date: Wed, 2 Dec 2015 23:35:31 +0100 > >> Why to continue to work if we know that we are making things wrong >> (incorrect structure initialization in this case) ? What am I missing? > >The user might be able to con

Re: [patch net-next v2 4/6] mlxsw: core: Implement temperature hwmon interface

2015-12-02 Thread David Miller
From: Jiri Pirko Date: Wed, 2 Dec 2015 23:35:31 +0100 > Why to continue to work if we know that we are making things wrong > (incorrect structure initialization in this case) ? What am I missing? The user might be able to continue to have connectivity and report the problem. BUG_ON() is really

Re: [patch net-next v2 4/6] mlxsw: core: Implement temperature hwmon interface

2015-12-02 Thread Jiri Pirko
Wed, Dec 02, 2015 at 11:28:47PM CET, da...@davemloft.net wrote: >From: Jiri Pirko >Date: Wed, 2 Dec 2015 23:25:52 +0100 > >> Again, there is no possible way to achieve this bugon, other than a >> stack corruption. I don't think we should try to cope with a stack >> corruption. > >Then remove the a

Re: [patch net-next v2 4/6] mlxsw: core: Implement temperature hwmon interface

2015-12-02 Thread David Miller
From: Jiri Pirko Date: Wed, 2 Dec 2015 23:25:52 +0100 > Again, there is no possible way to achieve this bugon, other than a > stack corruption. I don't think we should try to cope with a stack > corruption. Then remove the assertion. -- To unsubscribe from this list: send the line "unsubscribe n

Re: [patch net-next v2 4/6] mlxsw: core: Implement temperature hwmon interface

2015-12-02 Thread Jiri Pirko
Wed, Dec 02, 2015 at 11:05:48PM CET, gerlitz...@gmail.com wrote: >On Sun, Nov 29, 2015 at 12:49 PM, Jiri Pirko wrote: >> Sun, Nov 29, 2015 at 10:04:07AM CET, gerlitz...@gmail.com wrote: >>>[..] +enum mlxsw_hwmon_attr_type { + MLXSW_HWMON_ATTR_TYPE_TEMP, + MLXSW_HWMON_ATT

Re: [patch net-next v2 4/6] mlxsw: core: Implement temperature hwmon interface

2015-12-02 Thread Or Gerlitz
On Sun, Nov 29, 2015 at 12:49 PM, Jiri Pirko wrote: > Sun, Nov 29, 2015 at 10:04:07AM CET, gerlitz...@gmail.com wrote: >>[..] >>> +enum mlxsw_hwmon_attr_type { >>> + MLXSW_HWMON_ATTR_TYPE_TEMP, >>> + MLXSW_HWMON_ATTR_TYPE_TEMP_MAX, >>> +}; >>> + >>> +static void mlxsw_hwmon_attr_add(st

Re: [patch net-next v2 4/6] mlxsw: core: Implement temperature hwmon interface

2015-11-29 Thread Jiri Pirko
Sun, Nov 29, 2015 at 10:04:07AM CET, gerlitz...@gmail.com wrote: >[..] >> +enum mlxsw_hwmon_attr_type { >> + MLXSW_HWMON_ATTR_TYPE_TEMP, >> + MLXSW_HWMON_ATTR_TYPE_TEMP_MAX, >> +}; >> + >> +static void mlxsw_hwmon_attr_add(struct mlxsw_hwmon *mlxsw_hwmon, >> +

Re: [patch net-next v2 4/6] mlxsw: core: Implement temperature hwmon interface

2015-11-29 Thread Or Gerlitz
[..] > +enum mlxsw_hwmon_attr_type { > + MLXSW_HWMON_ATTR_TYPE_TEMP, > + MLXSW_HWMON_ATTR_TYPE_TEMP_MAX, > +}; > + > +static void mlxsw_hwmon_attr_add(struct mlxsw_hwmon *mlxsw_hwmon, > +enum mlxsw_hwmon_attr_type attr_type, > +

[patch net-next v2 4/6] mlxsw: core: Implement temperature hwmon interface

2015-11-27 Thread Jiri Pirko
From: Jiri Pirko ASIC provides access to temperature sensors. Implement their exposure to userspace using hwmon. Signed-off-by: Jiri Pirko --- v1->v2: - fixed hwmon compile error when it is not set reported by l...@intel.com --- drivers/net/ethernet/mellanox/mlxsw/Kconfig | 8 + drivers