Skip to contentSkip to conversation

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

DISCUSSION Jiri Kosina 3 participants 3 messages Feb 26, 2013 – Feb 28, 2013 1 message not in the archive I2C subsystem host drivers

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 8 lines · 송은봉

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.

Quoted 35 lines

diff -up drivers/i2c/busses/i2c-octeon.c{.orig,}

i2c/busses/i2c-octeon.c 2013-02-21 08:09:38.344018898 -0800 renamed from i2c/busses/i2c-octeon.c.orig 2013-02-21 08:09:03.168018843 -0800 +0 -0
@@ -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;
 }

i2c/busses/i2c-octeon.c 2013-02-21 08:09:38.344018898 -0800 renamed from i2c/busses/i2c-octeon.c.orig 2013-02-21 08:09:03.168018843 -0800 +0 -0
@@ -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]

Signature · 2 lines
Jiri Kosina
SUSE Labs
#2 lore raw
Quoted 5 lines · Jiri Kosina
Quoted 3 lines · 송은봉

Quoted 8 lines
Quoted 5 lines

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.

Yes, this should not go via trivial. Please resend to i2c list. Patch looks okay from a glimpse (and fixes an issue we have seen before and fixed the same way).

Thanks,

Wolfram

#3 lore raw
Quoted 12 lines · Wolfram Sang
Quoted 11 lines · Jiri Kosina
Quoted 8 lines · 송은봉

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.

Quoted 6 lines
Quoted 2 lines

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

Yes, this should not go via trivial. Please resend to i2c list. Patch looks okay from a glimpse (and fixes an issue we have seen before and fixed the same way).

Just curios to know why reinitializing the i2c controller is a bad idea? This fix looks perfect but if we know that there is only one i2c device currently being controlled by controller.Can we(i know it is expensive compare to the fix provided) not re-initialize the i2c-controller?

Thanks,

Quoted 10 lines

Thanks,

Wolfram

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/