2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 14:43:58 +08:00

i2c: octeon: Fix i2c fail problem when a process is terminated by a signal

I've been debugging the abnormal operation of i2c on octeon. If a process is
terminated by signal in the middle of i2c operation, next i2c read operation
which is done by another process was failed. So i changed to ignore signal in
the middle of i2c operation. After that the problem was not reproduced.

Signed-off-by: Eunbong Song <eunb.song@samsung.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
송은봉 2013-04-17 21:40:17 +00:00 committed by Wolfram Sang
parent aaedeb6f19
commit 2637e5fd23

View File

@ -183,7 +183,7 @@ static irqreturn_t octeon_i2c_isr(int irq, void *dev_id)
struct octeon_i2c *i2c = dev_id;
octeon_i2c_int_disable(i2c);
wake_up_interruptible(&i2c->queue);
wake_up(&i2c->queue);
return IRQ_HANDLED;
}
@ -206,9 +206,9 @@ static int octeon_i2c_wait(struct octeon_i2c *i2c)
octeon_i2c_int_enable(i2c);
result = wait_event_interruptible_timeout(i2c->queue,
octeon_i2c_test_iflg(i2c),
i2c->adap.timeout);
result = wait_event_timeout(i2c->queue,
octeon_i2c_test_iflg(i2c),
i2c->adap.timeout);
octeon_i2c_int_disable(i2c);