From patchwork Fri Apr 16 17:25:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leann Ogasawara X-Patchwork-Id: 50347 X-Patchwork-Delegate: apw@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 9BB03B7D25 for ; Sat, 17 Apr 2010 03:25:39 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1O2pIN-0001wF-IS; Fri, 16 Apr 2010 18:25:35 +0100 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1O2pIL-0001vz-8U for kernel-team@lists.ubuntu.com; Fri, 16 Apr 2010 18:25:33 +0100 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1O2pIL-0006Xe-6l; Fri, 16 Apr 2010 18:25:33 +0100 Received: from c-76-105-148-120.hsd1.or.comcast.net ([76.105.148.120] helo=[192.168.1.4]) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1O2pIK-0004qO-Pu; Fri, 16 Apr 2010 18:25:33 +0100 Subject: Re: [Lucid] [Patch 2/3] SRU: Staging: comedi: usbdux.c: fix locking up of the driver when the comedi ringbuffer runs empty From: Leann Ogasawara To: kernel-team In-Reply-To: <1271438420.30561.115.camel@emiko> References: <1271438420.30561.115.camel@emiko> Date: Fri, 16 Apr 2010 10:25:30 -0700 Message-ID: <1271438730.30561.125.camel@emiko> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Cc: berndporr X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com >From 1b810f3bc20af60ff312a03828b1572b412afc2b Mon Sep 17 00:00:00 2001 From: Bernd Porr Date: Fri, 27 Nov 2009 12:00:53 +0000 Subject: [PATCH 2/3] Staging: comedi: usbdux.c: fix locking up of the driver when the comedi ringbuffer runs empty BugLink: http://bugs.launchpad.net/bugs/483343 Jan-Matthias Braun spotted a bug which locks up the driver when the comedi ring buffer runs empty and provided a patch. The driver would still send the data to comedi but the reader won't wake up any more. What's required is setting the flag COMEDI_CB_BLOCK after new data has arrived which wakes up the reader and therefore the read() command. Signed-off-by: Bernd Porr Signed-off-by: Greg Kroah-Hartman (cherry picked from commit d4c3a56587af3edbe5f618b20e800e9f9fde13cb upstream) Signed-off-by: Leann Ogasawara Acked-by: Andy Whitcroft Acked-by: Colin King --- drivers/staging/comedi/drivers/usbdux.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/comedi/drivers/usbdux.c index a4a65b0..5c9c1bc 100644 --- a/drivers/staging/comedi/drivers/usbdux.c +++ b/drivers/staging/comedi/drivers/usbdux.c @@ -1,4 +1,4 @@ -#define DRIVER_VERSION "v2.3" +#define DRIVER_VERSION "v2.4" #define DRIVER_AUTHOR "Bernd Porr, BerndPorr@f2s.com" #define DRIVER_DESC "Stirling/ITL USB-DUX -- Bernd.Porr@f2s.com" /* @@ -81,6 +81,8 @@ sampling rate. If you sample two channels you get 4kHz and so on. * 2.1: changed PWM API * 2.2: added firmware kernel request to fix an udev problem * 2.3: corrected a bug in bulk timeouts which were far too short + * 2.4: fixed a bug which causes the driver to hang when it ran out of data. + * Thanks to Jan-Matthias Braun and Ian to spot the bug and fix it. * */ @@ -532,6 +534,7 @@ static void usbduxsub_ai_IsocIrq(struct urb *urb) } } /* tell comedi that data is there */ + s->async->events |= COMEDI_CB_BLOCK | COMEDI_CB_EOS; comedi_event(this_usbduxsub->comedidev, s); }