Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3e6cb74f authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: drivers: remove inappropriate COMEDI_CB_EOA events



Hardware errors should be reported with the COMEDI_CB_ERROR event. This event
will cause the async command to cancel. It's not necessary to also set the
COMEDI_CB_EOA event. Remove these events.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a3b2ee1d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -539,7 +539,7 @@ static irqreturn_t pci9111_interrupt(int irq, void *p_device)
			spin_unlock_irqrestore(&dev->spinlock, irq_flags);
			dev_dbg(dev->class_dev, "fifo overflow\n");
			outb(0, dev->iobase + PCI9111_INT_CLR_REG);
			async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA;
			async->events |= COMEDI_CB_ERROR;
			comedi_handle_events(dev, s);

			return IRQ_HANDLED;
+2 −2
Original line number Diff line number Diff line
@@ -749,13 +749,13 @@ static irqreturn_t pci9118_interrupt(int irq, void *d)

	if (intcsr & MASTER_ABORT_INT) {
		dev_err(dev->class_dev, "AMCC IRQ - MASTER DMA ABORT!\n");
		s->async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA;
		s->async->events |= COMEDI_CB_ERROR;
		goto interrupt_exit;
	}

	if (intcsr & TARGET_ABORT_INT) {
		dev_err(dev->class_dev, "AMCC IRQ - TARGET DMA ABORT!\n");
		s->async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA;
		s->async->events |= COMEDI_CB_ERROR;
		goto interrupt_exit;
	}

+6 −6
Original line number Diff line number Diff line
@@ -743,14 +743,14 @@ static void pci1710_handle_every_sample(struct comedi_device *dev,
	status = inw(dev->iobase + PCI171x_STATUS);
	if (status & Status_FE) {
		dev_dbg(dev->class_dev, "A/D FIFO empty (%4x)\n", status);
		s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
		s->async->events |= COMEDI_CB_ERROR;
		comedi_handle_events(dev, s);
		return;
	}
	if (status & Status_FF) {
		dev_dbg(dev->class_dev,
			"A/D FIFO Full status (Fatal Error!) (%4x)\n", status);
		s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
		s->async->events |= COMEDI_CB_ERROR;
		comedi_handle_events(dev, s);
		return;
	}
@@ -761,7 +761,7 @@ static void pci1710_handle_every_sample(struct comedi_device *dev,
		val = inw(dev->iobase + PCI171x_AD_DATA);
		ret = pci171x_ai_dropout(dev, s, s->async->cur_chan, val);
		if (ret) {
			s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
			s->async->events |= COMEDI_CB_ERROR;
			break;
		}

@@ -795,7 +795,7 @@ static int move_block_from_fifo(struct comedi_device *dev,

		ret = pci171x_ai_dropout(dev, s, s->async->cur_chan, val);
		if (ret) {
			s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
			s->async->events |= COMEDI_CB_ERROR;
			return ret;
		}

@@ -816,14 +816,14 @@ static void pci1710_handle_fifo(struct comedi_device *dev,
	m = inw(dev->iobase + PCI171x_STATUS);
	if (!(m & Status_FH)) {
		dev_dbg(dev->class_dev, "A/D FIFO not half full! (%4x)\n", m);
		s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
		s->async->events |= COMEDI_CB_ERROR;
		comedi_handle_events(dev, s);
		return;
	}
	if (m & Status_FF) {
		dev_dbg(dev->class_dev,
			"A/D FIFO Full status (Fatal Error!) (%4x)\n", m);
		s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
		s->async->events |= COMEDI_CB_ERROR;
		comedi_handle_events(dev, s);
		return;
	}
+1 −1
Original line number Diff line number Diff line
@@ -1355,7 +1355,7 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d)
		outw(devpriv->adc_fifo_bits | LADFUL,
		     devpriv->control_status + INT_ADCFIFO);
		spin_unlock_irqrestore(&dev->spinlock, flags);
		async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
		async->events |= COMEDI_CB_ERROR;
	}

	comedi_handle_events(dev, s);
+1 −1
Original line number Diff line number Diff line
@@ -2804,7 +2804,7 @@ static void handle_ai_interrupt(struct comedi_device *dev,
	/*  check for fifo overrun */
	if (status & ADC_OVERRUN_BIT) {
		dev_err(dev->class_dev, "fifo overrun\n");
		async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
		async->events |= COMEDI_CB_ERROR;
	}
	/*  spin lock makes sure no one else changes plx dma control reg */
	spin_lock_irqsave(&dev->spinlock, flags);
Loading