aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/ip2/ip2main.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-10-19 15:24:59 -0400
committerJeff Garzik <jeff@garzik.org>2007-10-23 19:53:16 -0400
commitf3518e4ee70916e6bd43c8082e02f0dd1e19d7af (patch)
tree2af50242d12e9d15e6988d66f88a06d541354755 /drivers/char/ip2/ip2main.c
parent[NETDRVR] lib82596, netxen: delete pointless tests from irq handler (diff)
downloadlinux-dev-f3518e4ee70916e6bd43c8082e02f0dd1e19d7af.tar.xz
linux-dev-f3518e4ee70916e6bd43c8082e02f0dd1e19d7af.zip
drivers/char/ip2: split out irq core logic into separate function
No changes besides code movement and glue. Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/char/ip2/ip2main.c')
-rw-r--r--drivers/char/ip2/ip2main.c44
1 files changed, 26 insertions, 18 deletions
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c
index 2124dce38f2b..150e1e364ca7 100644
--- a/drivers/char/ip2/ip2main.c
+++ b/drivers/char/ip2/ip2main.c
@@ -1166,6 +1166,31 @@ ip2_interrupt_bh(struct work_struct *work)
/* */
/* */
/******************************************************************************/
+static void
+ip2_irq_work(i2eBordStrPtr pB)
+{
+#ifdef USE_IQI
+ if (NO_MAIL_HERE != ( pB->i2eStartMail = iiGetMail(pB))) {
+// Disable his interrupt (will be enabled when serviced)
+// This is mostly to protect from reentrancy.
+ iiDisableMailIrq(pB);
+
+// Park the board on the immediate queue for processing.
+ schedule_work(&pB->tqueue_interrupt);
+
+// Make sure the immediate queue is flagged to fire.
+ }
+#else
+
+// We are using immediate servicing here. This sucks and can
+// cause all sorts of havoc with ppp and others. The failsafe
+// check on iiSendPendingMail could also throw a hairball.
+
+ i2ServiceBoard( pB );
+
+#endif /* USE_IQI */
+}
+
static irqreturn_t
ip2_interrupt(int irq, void *dev_id)
{
@@ -1184,24 +1209,7 @@ ip2_interrupt(int irq, void *dev_id)
if ( pB && (pB->i2eUsingIrq == irq) ) {
handled = 1;
-#ifdef USE_IQI
-
- if (NO_MAIL_HERE != ( pB->i2eStartMail = iiGetMail(pB))) {
-// Disable his interrupt (will be enabled when serviced)
-// This is mostly to protect from reentrancy.
- iiDisableMailIrq(pB);
-
-// Park the board on the immediate queue for processing.
- schedule_work(&pB->tqueue_interrupt);
-
-// Make sure the immediate queue is flagged to fire.
- }
-#else
-// We are using immediate servicing here. This sucks and can
-// cause all sorts of havoc with ppp and others. The failsafe
-// check on iiSendPendingMail could also throw a hairball.
- i2ServiceBoard( pB );
-#endif /* USE_IQI */
+ ip2_irq_work(pB);
}
}