From e2266694b54d3ca44a2ef1821fe40f17a70a02f7 Mon Sep 17 00:00:00 2001 From: Bernd Porr Date: Sun, 27 Feb 2005 02:15:48 +0000 Subject: [PATCH] Removed a buffer overflow routine again. The buffer overflow can only be detected in the firmware when 3 out of 4 buffers are full. Thus, the condition that all 4 buffers are full gives already an buffer overflow. --- comedi/drivers/usbduxfast.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/comedi/drivers/usbduxfast.c b/comedi/drivers/usbduxfast.c index e754cffe..9fb73bc6 100644 --- a/comedi/drivers/usbduxfast.c +++ b/comedi/drivers/usbduxfast.c @@ -125,9 +125,6 @@ Status: testing // It's quad buffering and we have to ignore 4 packets. #define PACKETS_TO_IGNORE 4 -// Buffer overflow in the FX2 aborts the transmission -#define BUFFER_OVERFL_ABORTS 1 - ///////////////////////////////////////////// // comedi constants static comedi_lrange range_usbduxfast_ai_range = { 2, { @@ -406,21 +403,6 @@ static void usbduxfastsub_ai_Irq(struct urb *urb, struct pt_regs *regs) p=urb->transfer_buffer; if (!this_usbduxfastsub->ignore) { - if (*p==0xffff) { - // buffer overflow in the middle of the data stream - // let's make it a real error - printk("comedi%d: usbduxfast: buffer overflow in the usbduxfast box.\n", - this_usbduxfastsub->comedidev->minor); -#ifdef BUFFER_OVERFL_ABORTS - s->async->events |= COMEDI_CB_EOA; - s->async->events |= COMEDI_CB_ERROR; - comedi_event(this_usbduxfastsub->comedidev, - s, - s->async->events); - usbduxfast_ai_stop(this_usbduxfastsub,0); - return; -#endif - } if (!(this_usbduxfastsub->ai_continous)) { // not continous, fixed number of samples n=urb->actual_length/sizeof(uint16_t); -- 2.26.2