From: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Timur Tabi <timur-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
galak-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org,
broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org,
mditto-Vjf7OWgA3BLqlBn2x/YWAg@public.gmane.org
Subject: Re: [PATCH] i2c-mpc: do not allow interruptions when waiting for I2C to complete
Date: Tue, 10 Feb 2009 16:11:56 +0100 [thread overview]
Message-ID: <20090210151156.GA15678@pengutronix.de> (raw)
In-Reply-To: <1233928837-3401-1-git-send-email-timur-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 997 bytes --]
On Fri, Feb 06, 2009 at 08:00:37AM -0600, Timur Tabi wrote:
> The i2c_wait() function is using wait_event_interruptible_timeout() to wait for
> the I2C controller to signal that it has completed an I2C bus operation. If
> the process that causes the I2C operation terminated abruptly, the wait will
> be interrupted, returning an error. It is better to let the I2C operation
> finished before the process exits.
>
> It is safe to use wait_event_timeout() instead, because the timeout will allow
> the process to exit if the I2C bus hangs. It's also better to allow the
> I2C operation to finish, because unacknowledged I2C operations can cause the
> I2C bus to hang.
>
> Signed-off-by: Timur Tabi <timur-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Acked-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <w.sang@pengutronix.de>
To: Timur Tabi <timur@freescale.com>
Cc: linuxppc-dev@ozlabs.org, mditto@consentry.com,
broonie@opensource.wolfsonmicro.com, linux-i2c@vger.kernel.org
Subject: Re: [PATCH] i2c-mpc: do not allow interruptions when waiting for I2C to complete
Date: Tue, 10 Feb 2009 16:11:56 +0100 [thread overview]
Message-ID: <20090210151156.GA15678@pengutronix.de> (raw)
In-Reply-To: <1233928837-3401-1-git-send-email-timur@freescale.com>
[-- Attachment #1: Type: text/plain, Size: 946 bytes --]
On Fri, Feb 06, 2009 at 08:00:37AM -0600, Timur Tabi wrote:
> The i2c_wait() function is using wait_event_interruptible_timeout() to wait for
> the I2C controller to signal that it has completed an I2C bus operation. If
> the process that causes the I2C operation terminated abruptly, the wait will
> be interrupted, returning an error. It is better to let the I2C operation
> finished before the process exits.
>
> It is safe to use wait_event_timeout() instead, because the timeout will allow
> the process to exit if the I2C bus hangs. It's also better to allow the
> I2C operation to finish, because unacknowledged I2C operations can cause the
> I2C bus to hang.
>
> Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2009-02-10 15:11 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-06 14:00 [PATCH] i2c-mpc: do not allow interruptions when waiting for I2C to complete Timur Tabi
2009-02-06 14:00 ` Timur Tabi
[not found] ` <1233928837-3401-1-git-send-email-timur-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2009-02-10 14:59 ` Timur Tabi
2009-02-10 14:59 ` Timur Tabi
[not found] ` <ed82fe3e0902100659p2eec9de6j61f9ffb504d60a89-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-02-10 15:55 ` Jean Delvare
2009-02-10 15:55 ` Jean Delvare
[not found] ` <20090210165554.0da8bf7c-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-02-10 16:01 ` Timur Tabi
2009-02-10 16:01 ` Timur Tabi
[not found] ` <4991A4F2.8030506-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2009-02-10 16:10 ` Jean Delvare
2009-02-10 16:10 ` Jean Delvare
[not found] ` <20090210171000.1f45cc2d-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-02-10 16:21 ` Timur Tabi
2009-02-10 16:21 ` Timur Tabi
[not found] ` <4991A970.70508-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2009-02-10 16:28 ` Wolfram Sang
2009-02-10 16:28 ` Wolfram Sang
2009-02-11 0:16 ` Ben Dooks
2009-02-11 0:16 ` Ben Dooks
2009-02-10 15:11 ` Wolfram Sang [this message]
2009-02-10 15:11 ` Wolfram Sang
2009-02-11 0:17 ` Ben Dooks
2009-02-11 0:17 ` Ben Dooks
2009-02-19 16:41 ` Kumar Gala
2009-02-19 16:41 ` Kumar Gala
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=20090210151156.GA15678@pengutronix.de \
--to=w.sang-bicnvbalz9megne8c9+irq@public.gmane.org \
--cc=broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org \
--cc=galak-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@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 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.