Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754732AbbFKNz1 (ORCPT ); Thu, 11 Jun 2015 09:55:27 -0400 Received: from hofr.at ([212.69.189.236]:52180 "EHLO mail.hofr.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751092AbbFKNzV (ORCPT ); Thu, 11 Jun 2015 09:55:21 -0400 Date: Thu, 11 Jun 2015 15:55:19 +0200 From: Nicholas Mc Guire To: Wolfram Sang Cc: Nicholas Mc Guire , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC] i2c: octeon: allow receiving of signals. Message-ID: <20150611135519.GA28420@opentech.at> References: <1434029032-8811-1-git-send-email-hofrat@osadl.org> <20150611134435.GA6143@katana> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150611134435.GA6143@katana> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1813 Lines: 40 On Thu, 11 Jun 2015, Wolfram Sang wrote: > On Thu, Jun 11, 2015 at 03:23:52PM +0200, Nicholas Mc Guire wrote: > > Change wait_event_timeout() to wait_event_interruptible_timeout() allowing > > signals to be received while waiting on event (task state set to > > TASK_INTERRUPTIBLE) as the dev_dbg() string indicates that signals > > are expected to be possible. While at it fix the type to long (as returned > > by schedule_timeout(). > > > > Signed-off-by: Nicholas Mc Guire > > --- > > > > From the dev_dbg string "wait interrupted" it seems that interrupts are > > expected to be on - so most likely this should be > > wait_event_interruptible_timeout() and not wait_event_timeout() as the > > later return >= 0 always and sets the task state to TASK_UNINTERRUPTIBLE. > > Someone that knows the details of this driver needs to confirm this though. > > Use 'git log drivers/i2c/busses/i2c-octeon.c' and you will find commit > 2637e5fd232d421b680757944f613d4b1a36ae26 which disabled the signals. > For further digging, you could do > 'git log --grep="interruptible" drivers/i2c/busses' to find that signals > cause a lot of problems with i2c transactions. > > Summary: The code still handling signal code simply needs to go. > thanks - the output of 'git log --grep="interruptible" drivers/i2c/busses' really make it very clear - sorry for the noise - I had only been looking at the code of this driver to figure out how to resolve the obvious API inconsistency but did not check the broader scope. will fix it up and resend. thx! hofrat -- 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/