Re: I2C: Fix i2c fail problem when a process is terminated by asignal on octeon in 3.8

From: Jiri Kosina
Date: Tue Feb 26 2013 - 05:02:31 EST


On Fri, 22 Feb 2013, ììë wrote:

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

This is not really material directly for trivial.git. Adding maintainers
to CC.

>
> Â
>
> Signed-off-by: EunBong Song <eunb.song@xxxxxxxxxxx>
>
> diff -up drivers/i2c/busses/i2c-octeon.c{.orig,}
> --- drivers/i2c/busses/i2c-octeon.c.origÂ2013-02-21 08:09:03.168018843 -0800
> +++ drivers/i2c/busses/i2c-octeon.cÂ2013-02-21 08:09:38.344018898 -0800
> @@ -183,7 +183,7 @@ static irqreturn_t octeon_i2c_isr(int ir
> ÂÂstruct octeon_i2c *i2c = dev_id;
> Â
> ÂÂocteon_i2c_int_disable(i2c);
> -Âwake_up_interruptible(&i2c->queue);
> +Âwake_up(&i2c->queue);
> Â
> ÂÂreturn IRQ_HANDLED;
> Â}
> @@ -206,7 +206,7 @@ static int octeon_i2c_wait(struct octeon
> Â
> ÂÂocteon_i2c_int_enable(i2c);
> Â
> -Âresult = wait_event_interruptible_timeout(i2c->queue,
> +Âresult = wait_event_timeout(i2c->queue,
> ÂÂÂÂÂÂÂÂ octeon_i2c_test_iflg(i2c),
> ÂÂÂÂÂÂÂÂ i2c->adap.timeout);
>
> Â
>
> Â
>
> [IMAGE]
>
> [SeenTimeChecker?do=5c4ee24ec3c4b5ef0b1e1d188d51662fbee53716e9d11aa47790d17410439b26f5961395f090d04f94a68828d2d0a033db9fdddda33
> e82cbe4a391424e62fcf6cf878f9a26ce15a0]
>

--
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/