From 61237e2b7d7d52a328817ddb75905c1c51b0983d Mon Sep 17 00:00:00 2001 From: Bernd Porr Date: Thu, 26 Nov 2009 20:10:14 +0000 Subject: [PATCH] Jan-Matthias Braun spotted the problem that once the ring buffer of comedi has run empty the next read command would block forever even after new data has arrived. Thanks for Jan-Matthias and Ian who fixed the bug. --- comedi/drivers/usbdux.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/comedi/drivers/usbdux.c b/comedi/drivers/usbdux.c index 7fabeee6..1a42d6c5 100644 --- a/comedi/drivers/usbdux.c +++ b/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" /* @@ -77,6 +77,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: fixed a timeout bug with newer kernels (>2.6.30) + * 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. */ // generates loads of debug info @@ -538,6 +540,7 @@ static void usbduxsub_ai_IsocIrq(struct urb *urb PT_REGS_ARG) } } // tell comedi that data is there + s->async->events |= COMEDI_CB_BLOCK | COMEDI_CB_EOS; comedi_event(this_usbduxsub->comedidev, s); } -- 2.26.2