From: Guenter Roeck <guenter.roeck@ericsson.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH RFC] hwmon: (max16065) Add chip access
Date: Tue, 30 Aug 2011 16:13:24 +0000 [thread overview]
Message-ID: <20110830161324.GA25652@ericsson.com> (raw)
In-Reply-To: <1314683876-16557-1-git-send-email-guenter.roeck@ericsson.com>
On Tue, Aug 30, 2011 at 11:26:05AM -0400, Jean Delvare wrote:
> On Tue, 30 Aug 2011 07:26:44 -0700, Guenter Roeck wrote:
> > On Tue, Aug 30, 2011 at 03:14:12AM -0400, Jean Delvare wrote:
> > > On Mon, 29 Aug 2011 22:57:56 -0700, Guenter Roeck wrote:
> > > > The chips supported by the max16065 driver should not be accessed using direct
> > > > i2ctools commands. Add warning to driver documentation to alert users.
> > > >
> > > > Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
> > > > ---
> > > > RFC: Do we want this kind of warning in driver documentation ?
> > >
> > > Sure, this can't hurt. Maybe we could add a section in i2c-tools'
> > > documentation as well, listing the dangerous chips, starting with this
> > > one? i2cdetect already has a note about the AT24RF08 for historical
> > > reasons, I wouldn't mind documenting the "dangerous" chips more
> > > prominently. Hopefully the list will stay short.
> > >
> > Hopefully yes. Many of the PMBus chips are potentially affected, though.
> > They typically have a means to protect settings from overwrite, but if that
> > is not enabled, one can be in hot water. Worst I have seen so far was
> > to execute i2cdump on an eval board and it lost its configuration :(.
>
> You are lucky. Back in 2002, worse a few lm-sensors users saw was their
> shiny new Thinkpad laptop tuned into a brick by sensors-detect (not
> even i2c-tools) due to what ended up being a state machine bug in the
> AT24RF08.)
>
> Speaking of this... At which I2C addresses to these PMBus devices live?
> MAX16065/66 in particular but also other chips with similar problems.
MAX16065/66 is not a PMBus device ... by default, it resides at 0x50..0x53
(possibly the worst address space available for such a device).
That address can be overwritten by software to any valid address.
It does not have an ID register, so it can not be auto-detected.
PMBus devices can unfortunately be at any valid address. Many chips use a set
of resistors to set the address. Even those not using resistors can often
be programmed by SW to any address.
> If these are addresses sensors-detect is probing, then it's only a
> matter of time before we get a report from a user hitting the problem.
>
Might well be. Most don't react too badly on reads, though. I had the problem
specifically with the Intersil chips. On those, the byte reads done by i2cdump
on write-only command registers are accepted as write commands. This causes
the chip configuration to be lost unless all writes are disabled/secured.
Which was not the case on my eval board. Oops ...
Turning PMBus chips into bricks is actually quite simple - I managed to do it
with several chips from multiple vendors. Since one has to do that on purpose
or by being careless (as in my case ;), so I would not count that against
the chips.
> Probably it's about time to let the kernel block user-space probing of
> specific I2C buses.
Sounds like a good idea. This is one reason why we don't set I2C_CLASS_HWMON
in our internal I2C adapter drivers.
Guenter
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2011-08-30 16:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-30 5:57 [lm-sensors] [PATCH RFC] hwmon: (max16065) Add chip access warning Guenter Roeck
2011-08-30 7:14 ` [lm-sensors] [PATCH RFC] hwmon: (max16065) Add chip access Jean Delvare
2011-08-30 14:26 ` Guenter Roeck
2011-08-30 15:26 ` Jean Delvare
2011-08-30 16:13 ` Guenter Roeck [this message]
2011-08-31 7:45 ` Jean Delvare
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=20110830161324.GA25652@ericsson.com \
--to=guenter.roeck@ericsson.com \
--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.