From: Hans de Goede <j.w.r.degoede@hhs.nl>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [RFC] Support of chassis intrusion detection
Date: Thu, 19 Feb 2009 18:44:28 +0000 [thread overview]
Message-ID: <499DA88C.10409@hhs.nl> (raw)
In-Reply-To: <20090217230215.5106b6c0@hyperion.delvare>
Jean Delvare wrote:
> On Thu, 19 Feb 2009 10:37:33 +0100, Hans de Goede wrote:
>> Jean Delvare wrote:
>>> Hi all,
>>>
>>> A number of users have asked us to support the chassis intrusion
>>> detection feature which some hardware monitoring chip have. I've
>>> created a ticket for this:
>>> http://www.lm-sensors.org/ticket/2370
>>> Here is a proposal.
>>>
>>> sysfs interface
>>> =======>>>
>>> chassis_intrusion
>>> Chassis intrusion detection
>>> 0: OK
>>> 1: intrusion detected
>>> RW
>>> Writing 0 clears the detection flag.
>>> Writing other values is unsupported.
>>>
>
> Having thought about it some more, I suspect this won't be sufficient.
> This feature is like an alarm flag, which suggests that chips which
> support beeping may have a beep control bit for it too. So maybe we
> should define:
>
> chassis_intrusion_alarm
> chassis_intrusion_beep
>
> I didn't look at all the datasheets yet to find out whether any chip
> actually implements this, but this doesn't sound unreasonable.
>
>>> It's not totally clear whether clearing should be done by writing 0 or
>>> 1. 0 is more respectful of traditional sysfs semantics that you should
>>> be able to read back what you just wrote, so it has my vote.
>>>
>>> drivers
>>> ===>>>
>>> Drivers adm9240, w83792d and w83793 implement this feature in
>>> non-standard ways. They should be converted to the new, standard
>>> interface.
>>>
>>> libsensors
>>> =====
>>>
>>> Either
>>>
>>> SENSORS_FEATURE_CHASSIS_INTRUSION = 0x19
>>> SENSORS_SUBFEATURE_CHASSIS_INTRUSION = SENSORS_FEATURE_CHASSIS_INTRUSION << 8
>>>
>>> or rename SENSORS_FEATURE_BEEP_ENABLE to SENSORS_FEATURE_MISC and
>>>
>>> SENSORS_SUBFEATURE_BEEP_ENABLE = SENSORS_FEATURE_MISC << 8
>>> SENSORS_SUBFEATURE_CHASSIS_INTRUSION = (SENSORS_FEATURE_MISC << 8) + 1
>>>
>>> sensors
>>> ===>>>
>>> Reading the value of the chassis intrusion detection subfeature is done
>>> like for any other subfeature.
>>>
>>> Writing, OTOH, can't be handled the same as writing limits, because we
>>> certainly don't want to clear the flag automatically at lm_sensors
>>> start or restart time. So we could add a dedicated flag to clear the
>>> chassis intrusion detection flag (e.g. "sensors --clear-chassis").
>>>
>>> If anyone has objections or comments, please speak up.
>>>
>> looks good to me, but I wonder if we should not prepare for the case where an
>> IC has more then one chasis intrusion detection pin.
>
> The same question has been raised by other reviewers already. I am
> shared between simplicity (we've never seen a system with more than
> one, and there is no obvious scenario) and completeness (who knows...)
>
> The point which makes me reluctant to go for multiple inputs is how we
> are going to handle clearing them with "sensors". Should "sensors
> --clear-intrusion" clear them all? Or do we need to provide a parameter
> specifying which intrusion detector needs to be cleared? The latter
> seems somewhat overkill in the usual case of a single chassis intrusion
> detector. If we go for the former, we have less control but then
> supporting multiple intrusion detectors is cheap.
>
IMHO: Just make it clear all, if someone really wants to clear only one he can
use echo 0 > /sys/....
Regards,
Hans
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
prev parent reply other threads:[~2009-02-19 18:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-17 22:02 [lm-sensors] [RFC] Support of chassis intrusion detection Jean Delvare
2009-02-18 13:20 ` Matt Roberds
2009-02-18 13:54 ` Jean Delvare
2009-02-18 15:37 ` Jean Delvare
2009-02-19 9:37 ` Hans de Goede
2009-02-19 10:51 ` Jean Delvare
2009-02-19 13:00 ` Matt Roberds
2009-02-19 17:42 ` Jean Delvare
2009-02-19 18:44 ` Hans de Goede [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=499DA88C.10409@hhs.nl \
--to=j.w.r.degoede@hhs.nl \
--cc=lm-sensors@vger.kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.