Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752035Ab3FFNoT (ORCPT ); Thu, 6 Jun 2013 09:44:19 -0400 Received: from mail.abilis.ch ([195.70.19.74]:27317 "EHLO mail.abilis.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751862Ab3FFNoO (ORCPT ); Thu, 6 Jun 2013 09:44:14 -0400 From: Christian Ruppert To: Wolfram Sang , Mika Westerberg Cc: Jean Delvare , Pierrick Hascoet , Christian Ruppert , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] i2c: designware: make i2c xfers non-interruptible Date: Thu, 6 Jun 2013 15:43:36 +0200 Message-Id: <1370526216-10060-2-git-send-email-christian.ruppert@abilis.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1370526216-10060-1-git-send-email-christian.ruppert@abilis.com> References: <1370526216-10060-1-git-send-email-christian.ruppert@abilis.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1374 Lines: 33 When the process at the source of an i2c transfer is killed in the middle of the transfer, the transfer is interrupted. Interrupted transfers might cause buggy slaves on the bus (or higher level drivers) to go haywire. This patch forces ongoing i2c transfers to finish properly, even if the initiating process is killed. Signed-off-by: Christian Ruppert --- drivers/i2c/busses/i2c-designware-core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-core.c b/drivers/i2c/busses/i2c-designware-core.c index 65c0c7a..d903368 100644 --- a/drivers/i2c/busses/i2c-designware-core.c +++ b/drivers/i2c/busses/i2c-designware-core.c @@ -585,7 +585,7 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) i2c_dw_xfer_init(dev); /* wait for tx to complete */ - ret = wait_for_completion_interruptible_timeout(&dev->cmd_complete, HZ); + ret = wait_for_completion_timeout(&dev->cmd_complete, HZ); if (ret == 0) { dev_err(dev->dev, "controller timed out\n"); /* i2c_dw_init implicitly disables the adapter */ -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/