Thread (12 messages) flat view 12 messages, 4 authors, 2012-06-25

Re: [PATCH 3/3 net-next] tg3: Add sysfs file to export sensor data

From: Ben Hutchings <hidden>
Date: 2012-06-23 15:02:17

On Fri, 2012-06-22 at 18:04 -0700, Michael Chan wrote:
On Fri, 2012-06-22 at 17:26 -0700, David Miller wrote: 
quoted
From: "Michael Chan" <mchan@broadcom.com>
Date: Wed, 20 Jun 2012 17:06:32 -0700
quoted
Some tg3 devices have management firmware that can export data such as
temperature and other real time diagnostics data.  Export this data to
sysfs so that userspace can access this information.

Signed-off-by: Matt Carlson <redacted>
Signed-off-by: Nithin Nayak Sujir <redacted>
Signed-off-by: Michael Chan <mchan@broadcom.com>
I do not agree that sysfs is the appropriate place to export binary
data.
What's your suggestion?  ethtool?
Temperature and voltage can be exposed through an hwmon device (which
practically means you use multiple attributes with conventional names).
Other diagnostics might possible be suitable for ethtool stats,
depending on what they are.

If the driver can't easily parse the information (e.g. it varies greatly
between the different chips and firmware versions) then a binary
attribute or private ioctl might be appropriate.  But generic interfaces
really should be considered first.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help