From patchwork Thu Apr 18 07:40:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?7Iah7J2A67SJ?= X-Patchwork-Id: 237471 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 234962C01D1 for ; Thu, 18 Apr 2013 17:40:20 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965997Ab3DRHkT (ORCPT ); Thu, 18 Apr 2013 03:40:19 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:26203 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965980Ab3DRHkS (ORCPT ); Thu, 18 Apr 2013 03:40:18 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MLF00GSUXB0TCO0@mailout3.samsung.com> for linux-i2c@vger.kernel.org; Thu, 18 Apr 2013 16:40:17 +0900 (KST) Received: from epcpsbgx4.samsung.com ( [203.254.230.45]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id A2.C3.20872.163AF615; Thu, 18 Apr 2013 16:40:17 +0900 (KST) X-AuditID: cbfee68d-b7f786d000005188-ac-516fa361f7b4 Received: from epextmailer02 ( [203.254.219.152]) by epcpsbgx4.samsung.com (EPCPMTA) with SMTP id A0.1B.24454.163AF615; Thu, 18 Apr 2013 16:40:17 +0900 (KST) Date: Thu, 18 Apr 2013 07:40:17 +0000 (GMT) From: =?euc-kr?B?vNvAurrA?= Subject: [PATCH] I2C: Fix i2c fail problem when a process is terminated by a signal on octeon in 3.8 To: "wsa@the-dreams.de" , linux-i2c@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reply-to: eunb.song@samsung.com MIME-version: 1.0 X-MTR: 20130418073423458@eunb.song Msgkey: 20130418073423458@eunb.song X-EPLocale: ko_KR.euc-kr X-Priority: 3 X-EPWebmail-Msg-Type: personal X-EPWebmail-Reply-Demand: 0 X-EPApproval-Locale: X-EPHeader: ML X-EPTrCode: X-EPTrName: X-MLAttribute: X-RootMTR: 20130418073423458@eunb.song X-ParentMTR: X-ArchiveUser: X-CPGSPASS: N Content-transfer-encoding: base64 Content-type: text/plain; charset=euc-kr MIME-version: 1.0 Message-id: <11412343.361631366270816380.JavaMail.weblogic@epv6ml12> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplleLIzCtJLcpLzFFi42I5/e+Zrm7i4vxAg4WnmC06/n5hdGD0+LxJ LoAxissmJTUnsyy1SN8ugSvj2sbognd8FQd3XmdpYNzB18XIySEkoCLR8v87YxcjB4eEgInE kY8qIGEJATGJC/fWs3UxcgGVLGOU6D57hxkiYSLRNussK0RiPqPEpy2zwBIsAqoSv1tXgdls QEUbfkxgB7GFBVIkdq7fzwpiiwj4SuyaM4MJxGYGqr/fspEZ4gh5icmnL4PV8woISpyc+YQF YpmSRMP/W6wQcWWJno2rGSHiEhKzpl9ghbB5JWa0P4Wql5OY9nUN1KHSEudnbWCE+Wbx98dQ cX6JY7d3MEE8zCvx5H4wzJjdm7+wQdgCElPPHIRqVZe4f7eNCcLmk1iz8C0LzJhdp5Yzw/Te 3zIX6i1FiSndD9khbC2JLz/2saF7i1fAReL8ubWMExiVZyFJzULSPgtJO7KaBYwsqxhFUwuS C4qT0osM9YoTc4tL89L1kvNzNzFCkkLvDsbbB6wPMSYDo2Qis5Rocj4wqeSVxBsamxlZmJqY GhuZW5qRJqwkzqvWYh0oJJCeWJKanZpakFoUX1Sak1p8iJGJg1OqgbFjzcHwWJ7bka9E55zj nRS99bBPe4LkExejFcWynDe+h5TXHI0I+mfDfeEnn1LCx77Tm3W3Hj93X3r7Y+kfR2Vnn07/ yy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5t26TEUpyRaKjFXFScCADxj9o5kwMAAA== DLP-Filter: Pass X-CFilter-Loop: Reflected Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org I rewrite my patch because the patch before i sent have many white space. Thanks! --- 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 --- drivers/i2c/busses/i2c-octeon.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) -- 1.7.0.4 diff --git a/drivers/i2c/busses/i2c-octeon.c b/drivers/i2c/busses/i2c-octeon.c index 935585e..b2e3259 100644 --- a/drivers/i2c/busses/i2c-octeon.c +++ b/drivers/i2c/busses/i2c-octeon.c @@ -183,7 +183,7 @@ static irqreturn_t octeon_i2c_isr(int irq, void *dev_id) struct octeon_i2c *i2c = dev_id; octeon_i2c_int_disable(i2c); - wake_up_interruptible(&i2c->queue); + wake_up(&i2c->queue); return IRQ_HANDLED; } @@ -206,9 +206,9 @@ static int octeon_i2c_wait(struct octeon_i2c *i2c) octeon_i2c_int_enable(i2c); - result = wait_event_interruptible_timeout(i2c->queue, - octeon_i2c_test_iflg(i2c), - i2c->adap.timeout); + result = wait_event_timeout(i2c->queue, + octeon_i2c_test_iflg(i2c), + i2c->adap.timeout); octeon_i2c_int_disable(i2c);