Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Oleksij Rempel <o.rempel@pengutronix.de>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Jean Delvare <jdelvare@suse.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	Marek Vasut <marex@denx.de>, David Jander <david@protonic.nl>,
	linux-hwmon@vger.kernel.org
Subject: Re: [PATCH net-next v1] net: phy: nxp-tja11xx: log critical health state
Date: Tue, 10 Aug 2021 20:42:45 +0200	[thread overview]
Message-ID: <YRLIpQIVgieYo1yc@lunn.ch> (raw)
In-Reply-To: <04df44d9-f049-e87b-81de-5a9fe888a49b@roeck-us.net>

> > I'm not so happy abusing the statistic counters like this. Especially
> > when we have a better API for temperature and voltage: hwmon.
> > 
> > phy_temp_warn maps to hwmon_temp_max_alarm. phy_temp_high maps to
> > either hwmon_temp_crit_alarm or hwmon_temp_emergency_alarm.
> > 
> > The under voltage maps to hwmon_in_lcrit_alarm.
> > 
> 
> FWIW, the statistics counters in this driver are already abused
> (phy_polarity_detect, phy_open_detect, phy_short_detect), so
> I am not sure if adding more abuse makes a difference (and/or
> if such abuse is common for phy drivers in general).

Hi Guenter

Abuse is not common in general. I think this is the only driver
abusing stats to return flags.  At the time those where added, we did
not have phy cable test support. Now we do, i would also suggest that
the driver makes use of that infrastructure to issue a cable test
report. These 'stats' need to stay, since they are ABI, but we should
not add more.

That is also why i said "Especially when we have a better API".

     Andrew


      reply	other threads:[~2021-08-10 18:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-10 12:56 Oleksij Rempel
2021-08-10 15:05 ` Andrew Lunn
2021-08-10 18:18   ` Guenter Roeck
2021-08-10 18:42     ` Andrew Lunn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YRLIpQIVgieYo1yc@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=david@protonic.nl \
    --cc=hkallweit1@gmail.com \
    --cc=jdelvare@suse.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=marex@denx.de \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --subject='Re: [PATCH net-next v1] net: phy: nxp-tja11xx: log critical health state' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).