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

login
register
mail settings
Submitter 송은봉
Date Feb. 26, 2013, 9:08 p.m.
Message ID <16202598.147281361912922998.JavaMail.weblogic@epml02>
Download mbox | patch
Permalink /patch/223398/
State Changes Requested
Headers show

Comments

송은봉 - Feb. 26, 2013, 9:08 p.m.
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>
Wolfram Sang - March 22, 2013, 10:43 a.m.
On Tue, Feb 26, 2013 at 09:08:43PM +0000, 송은봉 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.
> 
>  
> 
> Signed-off-by: EunBong Song <eunb.song@samsung.com>

Basically OK, but you have lots of whitespace issues, so I can't apply
your patch. Please resend and make sure it applies.

Thanks,

   Wolfram
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

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