Skip to content

Commit 3e6cb74

Browse files
bigguinessgregkh
authored andcommitted
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: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a3b2ee1 commit 3e6cb74

File tree

18 files changed

+36
-38
lines changed

18 files changed

+36
-38
lines changed

drivers/staging/comedi/drivers/adl_pci9111.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ static irqreturn_t pci9111_interrupt(int irq, void *p_device)
539539
spin_unlock_irqrestore(&dev->spinlock, irq_flags);
540540
dev_dbg(dev->class_dev, "fifo overflow\n");
541541
outb(0, dev->iobase + PCI9111_INT_CLR_REG);
542-
async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA;
542+
async->events |= COMEDI_CB_ERROR;
543543
comedi_handle_events(dev, s);
544544

545545
return IRQ_HANDLED;

drivers/staging/comedi/drivers/adl_pci9118.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,13 +749,13 @@ static irqreturn_t pci9118_interrupt(int irq, void *d)
749749

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

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

drivers/staging/comedi/drivers/adv_pci1710.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -743,14 +743,14 @@ static void pci1710_handle_every_sample(struct comedi_device *dev,
743743
status = inw(dev->iobase + PCI171x_STATUS);
744744
if (status & Status_FE) {
745745
dev_dbg(dev->class_dev, "A/D FIFO empty (%4x)\n", status);
746-
s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
746+
s->async->events |= COMEDI_CB_ERROR;
747747
comedi_handle_events(dev, s);
748748
return;
749749
}
750750
if (status & Status_FF) {
751751
dev_dbg(dev->class_dev,
752752
"A/D FIFO Full status (Fatal Error!) (%4x)\n", status);
753-
s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
753+
s->async->events |= COMEDI_CB_ERROR;
754754
comedi_handle_events(dev, s);
755755
return;
756756
}
@@ -761,7 +761,7 @@ static void pci1710_handle_every_sample(struct comedi_device *dev,
761761
val = inw(dev->iobase + PCI171x_AD_DATA);
762762
ret = pci171x_ai_dropout(dev, s, s->async->cur_chan, val);
763763
if (ret) {
764-
s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
764+
s->async->events |= COMEDI_CB_ERROR;
765765
break;
766766
}
767767

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

796796
ret = pci171x_ai_dropout(dev, s, s->async->cur_chan, val);
797797
if (ret) {
798-
s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
798+
s->async->events |= COMEDI_CB_ERROR;
799799
return ret;
800800
}
801801

@@ -816,14 +816,14 @@ static void pci1710_handle_fifo(struct comedi_device *dev,
816816
m = inw(dev->iobase + PCI171x_STATUS);
817817
if (!(m & Status_FH)) {
818818
dev_dbg(dev->class_dev, "A/D FIFO not half full! (%4x)\n", m);
819-
s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
819+
s->async->events |= COMEDI_CB_ERROR;
820820
comedi_handle_events(dev, s);
821821
return;
822822
}
823823
if (m & Status_FF) {
824824
dev_dbg(dev->class_dev,
825825
"A/D FIFO Full status (Fatal Error!) (%4x)\n", m);
826-
s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
826+
s->async->events |= COMEDI_CB_ERROR;
827827
comedi_handle_events(dev, s);
828828
return;
829829
}

drivers/staging/comedi/drivers/cb_pcidas.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1355,7 +1355,7 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d)
13551355
outw(devpriv->adc_fifo_bits | LADFUL,
13561356
devpriv->control_status + INT_ADCFIFO);
13571357
spin_unlock_irqrestore(&dev->spinlock, flags);
1358-
async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
1358+
async->events |= COMEDI_CB_ERROR;
13591359
}
13601360

13611361
comedi_handle_events(dev, s);

drivers/staging/comedi/drivers/cb_pcidas64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2804,7 +2804,7 @@ static void handle_ai_interrupt(struct comedi_device *dev,
28042804
/* check for fifo overrun */
28052805
if (status & ADC_OVERRUN_BIT) {
28062806
dev_err(dev->class_dev, "fifo overrun\n");
2807-
async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
2807+
async->events |= COMEDI_CB_ERROR;
28082808
}
28092809
/* spin lock makes sure no one else changes plx dma control reg */
28102810
spin_lock_irqsave(&dev->spinlock, flags);

drivers/staging/comedi/drivers/das16m1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ static void das16m1_handler(struct comedi_device *dev, unsigned int status)
455455
/* this probably won't catch overruns since the card doesn't generate
456456
* overrun interrupts, but we might as well try */
457457
if (status & OVRUN) {
458-
async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
458+
async->events |= COMEDI_CB_ERROR;
459459
dev_err(dev->class_dev, "fifo overflow\n");
460460
}
461461

drivers/staging/comedi/drivers/das1800.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ static void das1800_ai_handler(struct comedi_device *dev)
611611
/* clear OVF interrupt bit */
612612
outb(CLEAR_INTR_MASK & ~OVF, dev->iobase + DAS1800_STATUS);
613613
dev_err(dev->class_dev, "FIFO overflow\n");
614-
async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA;
614+
async->events |= COMEDI_CB_ERROR;
615615
comedi_handle_events(dev, s);
616616
return;
617617
}

drivers/staging/comedi/drivers/das800.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ static irqreturn_t das800_interrupt(int irq, void *d)
511511

512512
if (fifo_overflow) {
513513
spin_unlock_irqrestore(&dev->spinlock, irq_flags);
514-
async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA;
514+
async->events |= COMEDI_CB_ERROR;
515515
comedi_handle_events(dev, s);
516516
return IRQ_HANDLED;
517517
}

drivers/staging/comedi/drivers/dt3000.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ static irqreturn_t dt3k_interrupt(int irq, void *d)
355355
dt3k_ai_empty_fifo(dev, s);
356356

357357
if (status & (DT3000_ADSWERR | DT3000_ADHWERR))
358-
s->async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA;
358+
s->async->events |= COMEDI_CB_ERROR;
359359

360360
debug_n_ints++;
361361
if (debug_n_ints >= 10)

drivers/staging/comedi/drivers/gsc_hpdi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,12 @@ static irqreturn_t gsc_hpdi_interrupt(int irq, void *d)
261261

262262
if (hpdi_board_status & RX_OVERRUN_BIT) {
263263
dev_err(dev->class_dev, "rx fifo overrun\n");
264-
async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
264+
async->events |= COMEDI_CB_ERROR;
265265
}
266266

267267
if (hpdi_board_status & RX_UNDERRUN_BIT) {
268268
dev_err(dev->class_dev, "rx fifo underrun\n");
269-
async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
269+
async->events |= COMEDI_CB_ERROR;
270270
}
271271

272272
if (devpriv->dio_count == 0)

0 commit comments

Comments
 (0)