public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
To: Mike Ditto <mditto-Vjf7OWgA3BLqlBn2x/YWAg@public.gmane.org>
Cc: linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Timur Tabi <timur-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Subject: Re: Calling wait_event_interruptible_timeout() in I2C wait functions
Date: Thu, 5 Feb 2009 11:51:00 +0000	[thread overview]
Message-ID: <20090205115100.GD422@sirena.org.uk> (raw)
In-Reply-To: <4989F3F4.7070207-Vjf7OWgA3BLqlBn2x/YWAg@public.gmane.org>

On Wed, Feb 04, 2009 at 12:00:52PM -0800, Mike Ditto wrote:
> Timur Tabi wrote:
> > However, it appears that this is not common behavior for I2C driver.  In
> > fact, only these six drivers ever call wait_event_interruptible_timeout():

> > i2c-cpm.c

> I don't know about the others, but in i2c-cpm.c the use of interruptible
> wait seems incorrect.  Maybe it could be made correct, but as is, it
> does not correctly clean up the hardware state or return a useful
> value when interrupted by a signal.  It's not clear what to do, anyway -

This is exactly the problem for users that caused Timur to run into this
- further up the stack we're trying to do cleanup that involves writing
via I2C but the I2C writes error out due to the signal.

> handling (one second delay in the unlikely worst case for i2c-cpm).

Ditto for the Freescale PowerPC I2C driver.

  parent reply	other threads:[~2009-02-05 11:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-03 19:37 Calling wait_event_interruptible_timeout() in I2C wait functions Timur Tabi
2009-02-04 20:00 ` Mike Ditto
     [not found] ` <49889CFA.7070308-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2009-02-04 20:00   ` Mike Ditto
     [not found] ` <4989F3F4.7070207@consentry.com>
     [not found]   ` <4989F3F4.7070207-Vjf7OWgA3BLqlBn2x/YWAg@public.gmane.org>
2009-02-05 11:51     ` Mark Brown [this message]
     [not found]       ` <20090205115100.GD422-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2009-02-05 15:18         ` Timur Tabi

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=20090205115100.GD422@sirena.org.uk \
    --to=broonie-gfdadszt00ze9xe1eozjha@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
    --cc=mditto-Vjf7OWgA3BLqlBn2x/YWAg@public.gmane.org \
    --cc=timur-KZfg59tc24xl57MIdRCFDg@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox