All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Ditto <mditto-Vjf7OWgA3BLqlBn2x/YWAg@public.gmane.org>
To: linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org,
	Laurent Pinchart
	<laurentp-BSmb2szPELAwsLKNixborgC/G2K4zDHf@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Erratic MPC8248 CPM2 I2C behaviour
Date: Mon, 01 Dec 2008 16:51:47 -0800	[thread overview]
Message-ID: <493486A3.4040502@consentry.com> (raw)
In-Reply-To: <mailman.569.1227903153.29923.linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org>

(replying to myself again)

I wrote:
> But the key difference is that we see a persistent failure, while the
> erratum only mentions a problem with "the next transaction".

I think the timeout recovery code is not adequate for these CPM errors,
and that is why a transient error becomes a persistent one.  The
function cpm_i2c_force_close in i2c-cpm.c sends a CPM_CR_CLOSE_RX_BD
command, which will abort any receive transaction in progress, but if
it's the transmit phase that got the CPM hung up, there is no code to
abort that (and there does not exist a CP command to do so, as far as
I can tell).

So the I2C disable/enable seems to be an appropriate fix for the
persistent failure part of the problem.  Again, this doesn't explain
how it gets hung up the first time.

					-=] Mike [=-

WARNING: multiple messages have this Message-ID (diff)
From: Mike Ditto <mditto@consentry.com>
To: linuxppc-dev@ozlabs.org, Laurent Pinchart <laurentp@cse-semaphore.com>
Cc: linux-i2c@vger.kernel.org
Subject: Re: Erratic MPC8248 CPM2 I2C behaviour
Date: Mon, 01 Dec 2008 16:51:47 -0800	[thread overview]
Message-ID: <493486A3.4040502@consentry.com> (raw)
In-Reply-To: <mailman.569.1227903153.29923.linuxppc-dev@ozlabs.org>

(replying to myself again)

I wrote:
> But the key difference is that we see a persistent failure, while the
> erratum only mentions a problem with "the next transaction".

I think the timeout recovery code is not adequate for these CPM errors,
and that is why a transient error becomes a persistent one.  The
function cpm_i2c_force_close in i2c-cpm.c sends a CPM_CR_CLOSE_RX_BD
command, which will abort any receive transaction in progress, but if
it's the transmit phase that got the CPM hung up, there is no code to
abort that (and there does not exist a CP command to do so, as far as
I can tell).

So the I2C disable/enable seems to be an appropriate fix for the
persistent failure part of the problem.  Again, this doesn't explain
how it gets hung up the first time.

					-=] Mike [=-

  parent reply	other threads:[~2008-12-02  0:51 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.569.1227903153.29923.linuxppc-dev@ozlabs.org>
     [not found] ` <mailman.569.1227903153.29923.linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org>
2008-12-01 23:28   ` Erratic MPC8248 CPM2 I2C behaviour Mike Ditto
2008-12-01 23:28     ` Mike Ditto
2008-12-02  8:39     ` Joakim Tjernlund
2008-12-02  8:39       ` Joakim Tjernlund
     [not found]       ` <1228207199.9867.69.camel-/EMGr9iCeazgSi9v3i4K4Pmbkio/vSLMs0AfqQuZ5sE@public.gmane.org>
2008-12-02 10:50         ` Laurent Pinchart
2008-12-02 10:50           ` Laurent Pinchart
     [not found]           ` <200812021150.26233.laurentp-BSmb2szPELAwsLKNixborgC/G2K4zDHf@public.gmane.org>
2008-12-02 11:45             ` Joakim Tjernlund
2008-12-02 11:45               ` Joakim Tjernlund
2008-12-03  2:27         ` Mike Ditto
2008-12-03  2:27           ` Mike Ditto
     [not found]     ` <49347317.5080600-Vjf7OWgA3BLqlBn2x/YWAg@public.gmane.org>
2008-12-02 11:07       ` Laurent Pinchart
2008-12-02 11:07         ` Laurent Pinchart
     [not found]         ` <200812021207.06140.laurentp-BSmb2szPELAwsLKNixborgC/G2K4zDHf@public.gmane.org>
2008-12-03  1:44           ` Mike Ditto
2008-12-03  1:44             ` Mike Ditto
2008-12-01 23:30   ` Mike Ditto
2008-12-01 23:30     ` Mike Ditto
2008-12-02  0:51   ` Mike Ditto [this message]
2008-12-02  0:51     ` Mike Ditto
2008-12-01  9:52 Laurent Pinchart
  -- strict thread matches above, loose matches on Subject: below --
2008-11-28 16:24 Laurent Pinchart
2008-11-29  5:41 ` Wolfram Sang
     [not found]   ` <20081129054153.GA22692-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2008-12-01  9:56     ` Laurent Pinchart
2008-12-01  9:56       ` Laurent Pinchart
     [not found] ` <200811281724.49620.laurentp-BSmb2szPELAwsLKNixborgC/G2K4zDHf@public.gmane.org>
2008-12-04 15:37   ` Jochen Friedrich
2008-12-04 15:37     ` Jochen Friedrich

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=493486A3.4040502@consentry.com \
    --to=mditto-vjf7owga3blqlbn2x/ywag@public.gmane.org \
    --cc=laurentp-BSmb2szPELAwsLKNixborgC/G2K4zDHf@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.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.