From: Juergen Beisert <jbe-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: How to deal with pending signals in an i2c bus driver in a correct manner?
Date: Thu, 17 Feb 2011 17:44:35 +0100 [thread overview]
Message-ID: <201102171744.35972.jbe@pengutronix.de> (raw)
Hi,
some i2c bus drivers are checking if a signal is pending and aborting a
current i2c transfer. This seems reasonable to go back to userland as fast as
possible.
But yesterday I tried to run a simple 'cat' command on a device node which
does its transfers via an i2c bus. When the command receives a SIGINT,
someone (kernel? glibc?) closes the open file descriptor. This calls the
device's close routine, but as this point of time the signal is still pending
and no further i2c communication is possible ... the driver fails to shutdown
the i2c device.
What is the correct or expected behaviour of an i2c bus driver when a signal
is pending?
jbe
--
Pengutronix e.K. | Juergen Beisert |
Linux Solutions for Science and Industry | Phone: +49-8766-939 228 |
Vertretung Sued/Muenchen, Germany | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de/ |
reply other threads:[~2011-02-17 16:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=201102171744.35972.jbe@pengutronix.de \
--to=jbe-bicnvbalz9megne8c9+irq@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@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;
as well as URLs for NNTP newsgroup(s).