public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr•org>
To: Benjamin Herrenschmidt <benh@kernel•crashing.org>
Cc: linuxppc-dev@ozlabs•org, Paul Mackerras <paulus@samba•org>,
	Tim Shepard <shep@alum•mit.edu>
Subject: Re: i2c-powermac fails
Date: Tue, 13 Oct 2009 11:49:48 +0200	[thread overview]
Message-ID: <20091013114948.03608b7f@hyperion.delvare> (raw)
In-Reply-To: <1255426348.2192.187.camel@pasglop>

On Tue, 13 Oct 2009 20:32:28 +1100, Benjamin Herrenschmidt wrote:
> On Tue, 2009-10-13 at 11:23 +0200, Jean Delvare wrote:
> > Hi Ben, Paul,
> > 
> > I had a report by Tim Shepard (Cc'd) that the therm_adt746x driver
> > sometimes fails to initialize on his PowerBook G4 running kernel
> > 2.6.31. The following error message can be seen in the logs when the
> > failure happens:
> > 
> > therm_adt746x 7-002e: Thermostat failed to read config!
> > 
> > After enabling low-level i2c debugging, it turns out that the problem
> > is caused by low-level errors at the I2C bus level:
> 
> Nothing comes to mind immediately, but I'll have another look tomorrow.
> 
> Maybe we are configuring the i2c bus too fast ? Another possibility
> would be that the device needs some retries ...

I guess that retrying would work around the problem, yes. But I do not
think this is the proper solution. If retries were needed, they would
be needed all the time, not just at initialization time. And as I said,
the SMBus specification says that devices have to always ack their
slave address (they can always delay the transaction later if they need
more time) so I am reasonably certain that the ADT7467 does ack his
address always. If it seems otherwise, this suggests that either the
message was not properly sent on the bus (so the ADT7467 did not have
anything to ack), or the ADT7467's ack went on the bus but the I2C
master didn't see it.

I2C bus being setup too fast sounds more likely. It might be worth
adding an arbitrary delay after initialization, just to see if it
helps. Not sure where though, as I'm not familiar with the Powermac
initialization steps. Maybe right before i2c_add_adapter() in
i2c_powermac_probe?

-- 
Jean Delvare

  reply	other threads:[~2009-10-13  9:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-13  9:23 i2c-powermac fails Jean Delvare
2009-10-13  9:32 ` Benjamin Herrenschmidt
2009-10-13  9:49   ` Jean Delvare [this message]
2009-10-14 21:02     ` Jean Delvare
2009-10-14 21:26       ` Benjamin Herrenschmidt
2009-10-15 10:49         ` Jean Delvare
2009-10-15 11:19           ` Benjamin Herrenschmidt
2009-10-15 14:05             ` Jean Delvare
2009-10-16  7:44               ` Jean Delvare
2009-10-16  8:42                 ` Benjamin Herrenschmidt

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=20091013114948.03608b7f@hyperion.delvare \
    --to=khali@linux-fr$(echo .)org \
    --cc=benh@kernel$(echo .)crashing.org \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=paulus@samba$(echo .)org \
    --cc=shep@alum$(echo .)mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox