aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2013-05-16 06:30:59 -0400
committerWolfram Sang <wsa@the-dreams.de>2013-05-17 16:49:37 -0400
commitd295a86eab200b3f0c513e78dbe1f189fd32d397 (patch)
tree20e8211da3b410b9e6597340fafe8526d9ab1f89 /drivers
parent53229345502bf3713cce220e849743f83065381d (diff)
i2c: mv64xxx: work around signals causing I2C transactions to be aborted
Do not use interruptible waits in an I2C driver; if a process uses signals (eg, Xorg uses SIGALRM and SIGPIPE) then these signals can cause the I2C driver to abort a transaction in progress by another driver, which can cause that driver to fail. I2C drivers are not expected to abort transactions on signals. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/busses/i2c-mv64xxx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
index 3bbd65d35a5e..1a3abd6a0bfc 100644
--- a/drivers/i2c/busses/i2c-mv64xxx.c
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
@@ -252,7 +252,7 @@ mv64xxx_i2c_do_action(struct mv64xxx_i2c_data *drv_data)
252 writel(drv_data->cntl_bits, 252 writel(drv_data->cntl_bits,
253 drv_data->reg_base + MV64XXX_I2C_REG_CONTROL); 253 drv_data->reg_base + MV64XXX_I2C_REG_CONTROL);
254 drv_data->block = 0; 254 drv_data->block = 0;
255 wake_up_interruptible(&drv_data->waitq); 255 wake_up(&drv_data->waitq);
256 break; 256 break;
257 257
258 case MV64XXX_I2C_ACTION_CONTINUE: 258 case MV64XXX_I2C_ACTION_CONTINUE:
@@ -300,7 +300,7 @@ mv64xxx_i2c_do_action(struct mv64xxx_i2c_data *drv_data)
300 writel(drv_data->cntl_bits | MV64XXX_I2C_REG_CONTROL_STOP, 300 writel(drv_data->cntl_bits | MV64XXX_I2C_REG_CONTROL_STOP,
301 drv_data->reg_base + MV64XXX_I2C_REG_CONTROL); 301 drv_data->reg_base + MV64XXX_I2C_REG_CONTROL);
302 drv_data->block = 0; 302 drv_data->block = 0;
303 wake_up_interruptible(&drv_data->waitq); 303 wake_up(&drv_data->waitq);
304 break; 304 break;
305 305
306 case MV64XXX_I2C_ACTION_INVALID: 306 case MV64XXX_I2C_ACTION_INVALID:
@@ -315,7 +315,7 @@ mv64xxx_i2c_do_action(struct mv64xxx_i2c_data *drv_data)
315 writel(drv_data->cntl_bits | MV64XXX_I2C_REG_CONTROL_STOP, 315 writel(drv_data->cntl_bits | MV64XXX_I2C_REG_CONTROL_STOP,
316 drv_data->reg_base + MV64XXX_I2C_REG_CONTROL); 316 drv_data->reg_base + MV64XXX_I2C_REG_CONTROL);
317 drv_data->block = 0; 317 drv_data->block = 0;
318 wake_up_interruptible(&drv_data->waitq); 318 wake_up(&drv_data->waitq);
319 break; 319 break;
320 } 320 }
321} 321}
@@ -381,7 +381,7 @@ mv64xxx_i2c_wait_for_completion(struct mv64xxx_i2c_data *drv_data)
381 unsigned long flags; 381 unsigned long flags;
382 char abort = 0; 382 char abort = 0;
383 383
384 time_left = wait_event_interruptible_timeout(drv_data->waitq, 384 time_left = wait_event_timeout(drv_data->waitq,
385 !drv_data->block, drv_data->adapter.timeout); 385 !drv_data->block, drv_data->adapter.timeout);
386 386
387 spin_lock_irqsave(&drv_data->lock, flags); 387 spin_lock_irqsave(&drv_data->lock, flags);