linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to deal with pending signals in an i2c bus driver in a correct manner?
@ 2011-02-17 16:44 Juergen Beisert
  0 siblings, 0 replies; only message in thread
From: Juergen Beisert @ 2011-02-17 16:44 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA

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/  |

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-02-17 16:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-17 16:44 How to deal with pending signals in an i2c bus driver in a correct manner? Juergen Beisert

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).