Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 317382
b: refs/heads/master
c: ef5bbfc
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jun 15, 2012
1 parent 878477f commit adcb727
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 30 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d6cbe537c6f0cb99bc76a48d138ac21f7ec59548
refs/heads/master: ef5bbfcb29db95c944bbfd4487454cd237d38b29
22 changes: 1 addition & 21 deletions trunk/drivers/staging/comedi/drivers/me4000.c
Original file line number Diff line number Diff line change
Expand Up @@ -1451,12 +1451,8 @@ static irqreturn_t me4000_ai_isr(int irq, void *dev_id)
int c = 0;
long lval;

ISR_PDEBUG("me4000_ai_isr() is executed\n");

if (!dev->attached) {
ISR_PDEBUG("me4000_ai_isr() premature interrupt\n");
if (!dev->attached)
return IRQ_NONE;
}

/* Reset all events */
s->async->events = 0;
Expand All @@ -1471,16 +1467,12 @@ static irqreturn_t me4000_ai_isr(int irq, void *dev_id)

if (inl(ai_context->irq_status_reg) &
ME4000_IRQ_STATUS_BIT_AI_HF) {
ISR_PDEBUG
("me4000_ai_isr(): Fifo half full interrupt occurred\n");

/* Read status register to find out what happened */
tmp = inl(ai_context->ctrl_reg);

if (!(tmp & ME4000_AI_STATUS_BIT_FF_DATA) &&
!(tmp & ME4000_AI_STATUS_BIT_HF_DATA) &&
(tmp & ME4000_AI_STATUS_BIT_EF_DATA)) {
ISR_PDEBUG("me4000_ai_isr(): Fifo full\n");
c = ME4000_AI_FIFO_COUNT;

/*
Expand All @@ -1500,8 +1492,6 @@ static irqreturn_t me4000_ai_isr(int irq, void *dev_id)
} else if ((tmp & ME4000_AI_STATUS_BIT_FF_DATA)
&& !(tmp & ME4000_AI_STATUS_BIT_HF_DATA)
&& (tmp & ME4000_AI_STATUS_BIT_EF_DATA)) {
ISR_PDEBUG("me4000_ai_isr(): Fifo half full\n");

s->async->events |= COMEDI_CB_BLOCK;

c = ME4000_AI_FIFO_COUNT / 2;
Expand All @@ -1527,8 +1517,6 @@ static irqreturn_t me4000_ai_isr(int irq, void *dev_id)
"Undefined FIFO state\n", dev->minor);
}

ISR_PDEBUG("me4000_ai_isr(): Try to read %d values\n", c);

for (i = 0; i < c; i++) {
/* Read value from data fifo */
lval = inl(ai_context->data_reg) & 0xFFFF;
Expand All @@ -1555,17 +1543,13 @@ static irqreturn_t me4000_ai_isr(int irq, void *dev_id)
}

/* Work is done, so reset the interrupt */
ISR_PDEBUG("me4000_ai_isr(): Reset fifo half full interrupt\n");
tmp |= ME4000_AI_CTRL_BIT_HF_IRQ_RESET;
outl(tmp, ai_context->ctrl_reg);
tmp &= ~ME4000_AI_CTRL_BIT_HF_IRQ_RESET;
outl(tmp, ai_context->ctrl_reg);
}

if (inl(ai_context->irq_status_reg) & ME4000_IRQ_STATUS_BIT_SC) {
ISR_PDEBUG
("me4000_ai_isr(): Sample counter interrupt occurred\n");

s->async->events |= COMEDI_CB_BLOCK | COMEDI_CB_EOA;

/*
Expand Down Expand Up @@ -1593,16 +1577,12 @@ static irqreturn_t me4000_ai_isr(int irq, void *dev_id)
}

/* Work is done, so reset the interrupt */
ISR_PDEBUG
("me4000_ai_isr(): Reset interrupt from sample counter\n");
tmp |= ME4000_AI_CTRL_BIT_SC_IRQ_RESET;
outl(tmp, ai_context->ctrl_reg);
tmp &= ~ME4000_AI_CTRL_BIT_SC_IRQ_RESET;
outl(tmp, ai_context->ctrl_reg);
}

ISR_PDEBUG("me4000_ai_isr(): Events = 0x%X\n", s->async->events);

if (s->async->events)
comedi_event(dev, s);

Expand Down
8 changes: 0 additions & 8 deletions trunk/drivers/staging/comedi/drivers/me4000.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,8 @@
Debug section
===========================================================================*/

#undef ME4000_ISR_DEBUG /* Debug the interrupt service routine */
#undef ME4000_DEBUG /* General purpose debug masseges */

#ifdef ME4000_ISR_DEBUG
#undef ISR_PDEBUG
#define ISR_PDEBUG(fmt, args...) printk(KERN_DEBUG"comedi%d: me4000: " fmt, dev->minor, ##args)
#else
#define ISR_PDEBUG(fmt, args...) /* no debugging, do nothing */
#endif

#ifdef ME4000_DEBUG
#undef PDEBUG
#define PDEBUG(fmt, args...) printk(KERN_DEBUG"comedi%d: me4000: " fmt, dev->minor, ##args)
Expand Down

0 comments on commit adcb727

Please sign in to comment.