Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72446
b: refs/heads/master
c: 6bd3bd6
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Garzik committed Oct 23, 2007
1 parent 7a70d01 commit 05bb2b7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 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: f3518e4ee70916e6bd43c8082e02f0dd1e19d7af
refs/heads/master: 6bd3bd6794d4139aa1b5193a82e3adfcb488c392
27 changes: 20 additions & 7 deletions trunk/drivers/char/ip2/ip2main.c
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize)
continue;
rc = request_irq( ip2config.irq[i], ip2_interrupt,
IP2_SA_FLAGS | (ip2config.type[i] == PCI ? IRQF_SHARED : 0),
pcName, (void *)&pcName);
pcName, i2BoardPtrTable[i]);
if (rc) {
printk(KERN_ERR "IP2: an request_irq failed: error %d\n",rc);
ip2config.irq[i] = CIR_POLL;
Expand Down Expand Up @@ -1191,12 +1191,12 @@ ip2_irq_work(i2eBordStrPtr pB)
#endif /* USE_IQI */
}

static irqreturn_t
ip2_interrupt(int irq, void *dev_id)
static void
ip2_polled_interrupt(void)
{
int i;
i2eBordStrPtr pB;
int handled = 0;
const int irq = 0;

ip2trace (ITRC_NO_PORT, ITRC_INTR, 99, 1, irq );

Expand All @@ -1208,15 +1208,28 @@ ip2_interrupt(int irq, void *dev_id)
// IRQ = 0 for polled boards, we won't poll "IRQ" boards

if ( pB && (pB->i2eUsingIrq == irq) ) {
handled = 1;
ip2_irq_work(pB);
}
}

++irq_counter;

ip2trace (ITRC_NO_PORT, ITRC_INTR, ITRC_RETURN, 0 );
return IRQ_RETVAL(handled);
}

static irqreturn_t
ip2_interrupt(int irq, void *dev_id)
{
i2eBordStrPtr pB = dev_id;

ip2trace (ITRC_NO_PORT, ITRC_INTR, 99, 1, pB->i2eUsingIrq );

ip2_irq_work(pB);

++irq_counter;

ip2trace (ITRC_NO_PORT, ITRC_INTR, ITRC_RETURN, 0 );
return IRQ_HANDLED;
}

/******************************************************************************/
Expand All @@ -1239,7 +1252,7 @@ ip2_poll(unsigned long arg)
// Just polled boards, IRQ = 0 will hit all non-interrupt boards.
// It will NOT poll boards handled by hard interrupts.
// The issue of queued BH interrups is handled in ip2_interrupt().
ip2_interrupt(0, NULL);
ip2_polled_interrupt();

PollTimer.expires = POLL_TIMEOUT;
add_timer( &PollTimer );
Expand Down

0 comments on commit 05bb2b7

Please sign in to comment.