From: Peter Korsgaard >> True. What should happen on ERESTARTSYS? Send a stop on the bus? Andrew> Is up to you. If you cannot work out any sane response to Andrew> interruption-by-signal then I guess we should sleep uninterruptibly. The following little patch does that. It also sets the timeout to a more sensible value (HZ). Signed-off-by: Peter Korsgaard Cc: Jean Delvare Cc: Greg KH Signed-off-by: Andrew Morton --- drivers/i2c/busses/i2c-ocores.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff -puN drivers/i2c/busses/i2c-ocores.c~opencores-i2c-bus-driver-fix drivers/i2c/busses/i2c-ocores.c --- 25/drivers/i2c/busses/i2c-ocores.c~opencores-i2c-bus-driver-fix Mon Apr 24 15:59:40 2006 +++ 25-akpm/drivers/i2c/busses/i2c-ocores.c Mon Apr 24 15:59:40 2006 @@ -80,7 +80,7 @@ static void ocores_process(struct ocores if ((i2c->state == STATE_DONE) || (i2c->state == STATE_ERROR)) { /* stop has been sent */ oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_IACK); - wake_up_interruptible(&i2c->wait); + wake_up(&i2c->wait); return; } @@ -166,9 +166,8 @@ static int ocores_xfer(struct i2c_adapte oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_START); - if (wait_event_interruptible_timeout(i2c->wait, - (i2c->state == STATE_ERROR) || - (i2c->state == STATE_DONE), HZ*5)) + if (wait_event_timeout(i2c->wait, (i2c->state == STATE_ERROR) || + (i2c->state == STATE_DONE), HZ)) return (i2c->state == STATE_DONE) ? num : -EIO; else return -ETIMEDOUT; _