Commit 72743970 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] irqs: char drivers

Fix up various char drivers for the IRQ API change.  Also IDE, ISDN and i2o
bits.  Fix various warnings and compilation errors.
parent 437ce181
...@@ -1090,7 +1090,7 @@ detect_isa_irq (volatile ucchar *address) ...@@ -1090,7 +1090,7 @@ detect_isa_irq (volatile ucchar *address)
whenever the card wants its hand held--chars whenever the card wants its hand held--chars
received, out buffer empty, modem change, etc. received, out buffer empty, modem change, etc.
*/ */
static void static irqreturn_t
cyy_interrupt(int irq, void *dev_id, struct pt_regs *regs) cyy_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{ {
struct tty_struct *tty; struct tty_struct *tty;
...@@ -1113,7 +1113,7 @@ cyy_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -1113,7 +1113,7 @@ cyy_interrupt(int irq, void *dev_id, struct pt_regs *regs)
#ifdef CY_DEBUG_INTERRUPTS #ifdef CY_DEBUG_INTERRUPTS
printk("cyy_interrupt: spurious interrupt %d\n\r", irq); printk("cyy_interrupt: spurious interrupt %d\n\r", irq);
#endif #endif
return; /* spurious interrupt */ return IRQ_NONE; /* spurious interrupt */
} }
card_base_addr = (unsigned char *)cinfo->base_addr; card_base_addr = (unsigned char *)cinfo->base_addr;
...@@ -1500,6 +1500,7 @@ cyy_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -1500,6 +1500,7 @@ cyy_interrupt(int irq, void *dev_id, struct pt_regs *regs)
cy_writeb((u_long)card_base_addr + (Cy_ClrIntr<<index), 0); cy_writeb((u_long)card_base_addr + (Cy_ClrIntr<<index), 0);
/* Cy_ClrIntr is 0x1800 */ /* Cy_ClrIntr is 0x1800 */
spin_unlock(&cinfo->card_lock); spin_unlock(&cinfo->card_lock);
return IRQ_HANDLED;
} /* cyy_interrupt */ } /* cyy_interrupt */
/***********************************************************/ /***********************************************************/
...@@ -1881,7 +1882,7 @@ cyz_handle_cmd(struct cyclades_card *cinfo) ...@@ -1881,7 +1882,7 @@ cyz_handle_cmd(struct cyclades_card *cinfo)
} }
#ifdef CONFIG_CYZ_INTR #ifdef CONFIG_CYZ_INTR
static void static irqreturn_t
cyz_interrupt(int irq, void *dev_id, struct pt_regs *regs) cyz_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{ {
struct cyclades_card *cinfo; struct cyclades_card *cinfo;
...@@ -1890,20 +1891,20 @@ cyz_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -1890,20 +1891,20 @@ cyz_interrupt(int irq, void *dev_id, struct pt_regs *regs)
#ifdef CY_DEBUG_INTERRUPTS #ifdef CY_DEBUG_INTERRUPTS
printk("cyz_interrupt: spurious interrupt %d\n\r", irq); printk("cyz_interrupt: spurious interrupt %d\n\r", irq);
#endif #endif
return; /* spurious interrupt */ return IRQ_NONE; /* spurious interrupt */
} }
if (!ISZLOADED(*cinfo)) { if (!ISZLOADED(*cinfo)) {
#ifdef CY_DEBUG_INTERRUPTS #ifdef CY_DEBUG_INTERRUPTS
printk("cyz_interrupt: board not yet loaded (IRQ%d).\n\r", irq); printk("cyz_interrupt: board not yet loaded (IRQ%d).\n\r", irq);
#endif #endif
return; return IRQ_NONE;
} }
/* Handle the interrupts */ /* Handle the interrupts */
cyz_handle_cmd(cinfo); cyz_handle_cmd(cinfo);
return; return IRQ_HANDLED;
} /* cyz_interrupt */ } /* cyz_interrupt */
static void static void
......
...@@ -653,7 +653,8 @@ static _INLINE_ void check_modem_status(struct esp_struct *info) ...@@ -653,7 +653,8 @@ static _INLINE_ void check_modem_status(struct esp_struct *info)
/* /*
* This is the serial driver's interrupt routine * This is the serial driver's interrupt routine
*/ */
static void rs_interrupt_single(int irq, void *dev_id, struct pt_regs * regs) static irqreturn_t rs_interrupt_single(int irq, void *dev_id,
struct pt_regs *regs)
{ {
struct esp_struct * info; struct esp_struct * info;
unsigned err_status; unsigned err_status;
...@@ -670,7 +671,7 @@ static void rs_interrupt_single(int irq, void *dev_id, struct pt_regs * regs) ...@@ -670,7 +671,7 @@ static void rs_interrupt_single(int irq, void *dev_id, struct pt_regs * regs)
if (!info->tty) { if (!info->tty) {
sti(); sti();
return; return IRQ_NONE;
} }
if (scratch & 0x04) { /* error */ if (scratch & 0x04) { /* error */
...@@ -753,6 +754,7 @@ static void rs_interrupt_single(int irq, void *dev_id, struct pt_regs * regs) ...@@ -753,6 +754,7 @@ static void rs_interrupt_single(int irq, void *dev_id, struct pt_regs * regs)
printk("end.\n"); printk("end.\n");
#endif #endif
sti(); sti();
return IRQ_HANDLED;
} }
/* /*
......
...@@ -274,7 +274,7 @@ static void ip2_hangup(PTTY); ...@@ -274,7 +274,7 @@ static void ip2_hangup(PTTY);
static void set_irq(int, int); static void set_irq(int, int);
static void ip2_interrupt_bh(i2eBordStrPtr pB); static void ip2_interrupt_bh(i2eBordStrPtr pB);
static void ip2_interrupt(int irq, void *dev_id, struct pt_regs * regs); static irqreturn_t ip2_interrupt(int irq, void *dev_id, struct pt_regs * regs);
static void ip2_poll(unsigned long arg); static void ip2_poll(unsigned long arg);
static inline void service_all_boards(void); static inline void service_all_boards(void);
static void do_input(void *p); static void do_input(void *p);
...@@ -1339,11 +1339,12 @@ ip2_interrupt_bh(i2eBordStrPtr pB) ...@@ -1339,11 +1339,12 @@ ip2_interrupt_bh(i2eBordStrPtr pB)
/* */ /* */
/* */ /* */
/******************************************************************************/ /******************************************************************************/
static void static irqreturn_t
ip2_interrupt(int irq, void *dev_id, struct pt_regs * regs) ip2_interrupt(int irq, void *dev_id, struct pt_regs * regs)
{ {
int i; int i;
i2eBordStrPtr pB; i2eBordStrPtr pB;
int handled = 0;
ip2trace (ITRC_NO_PORT, ITRC_INTR, 99, 1, irq ); ip2trace (ITRC_NO_PORT, ITRC_INTR, 99, 1, irq );
...@@ -1355,6 +1356,7 @@ ip2_interrupt(int irq, void *dev_id, struct pt_regs * regs) ...@@ -1355,6 +1356,7 @@ ip2_interrupt(int irq, void *dev_id, struct pt_regs * regs)
// IRQ = 0 for polled boards, we won't poll "IRQ" boards // IRQ = 0 for polled boards, we won't poll "IRQ" boards
if ( pB && (pB->i2eUsingIrq == irq) ) { if ( pB && (pB->i2eUsingIrq == irq) ) {
handled = 1;
#ifdef USE_IQI #ifdef USE_IQI
if (NO_MAIL_HERE != ( pB->i2eStartMail = iiGetMail(pB))) { if (NO_MAIL_HERE != ( pB->i2eStartMail = iiGetMail(pB))) {
...@@ -1379,6 +1381,7 @@ ip2_interrupt(int irq, void *dev_id, struct pt_regs * regs) ...@@ -1379,6 +1381,7 @@ ip2_interrupt(int irq, void *dev_id, struct pt_regs * regs)
++irq_counter; ++irq_counter;
ip2trace (ITRC_NO_PORT, ITRC_INTR, ITRC_RETURN, 0 ); ip2trace (ITRC_NO_PORT, ITRC_INTR, ITRC_RETURN, 0 );
return IRQ_RETVAL(handled);
} }
/******************************************************************************/ /******************************************************************************/
......
...@@ -509,7 +509,8 @@ static void isicom_bottomhalf(void * data) ...@@ -509,7 +509,8 @@ static void isicom_bottomhalf(void * data)
} }
/* main interrupt handler routine */ /* main interrupt handler routine */
static void isicom_interrupt(int irq, void * dev_id, struct pt_regs * regs) static irqreturn_t isicom_interrupt(int irq, void *dev_id,
struct pt_regs *regs)
{ {
struct isi_board * card; struct isi_board * card;
struct isi_port * port; struct isi_port * port;
...@@ -534,7 +535,7 @@ static void isicom_interrupt(int irq, void * dev_id, struct pt_regs * regs) ...@@ -534,7 +535,7 @@ static void isicom_interrupt(int irq, void * dev_id, struct pt_regs * regs)
if (!card || !(card->status & FIRMWARE_LOADED)) { if (!card || !(card->status & FIRMWARE_LOADED)) {
/* printk(KERN_DEBUG "ISICOM: interrupt: not handling irq%d!.\n", irq);*/ /* printk(KERN_DEBUG "ISICOM: interrupt: not handling irq%d!.\n", irq);*/
return; return IRQ_NONE;
} }
base = card->base; base = card->base;
...@@ -561,7 +562,7 @@ static void isicom_interrupt(int irq, void * dev_id, struct pt_regs * regs) ...@@ -561,7 +562,7 @@ static void isicom_interrupt(int irq, void * dev_id, struct pt_regs * regs)
ClearInterrupt(base); ClearInterrupt(base);
else else
outw(0x0000, base+0x04); /* enable interrupts */ outw(0x0000, base+0x04); /* enable interrupts */
return; return IRQ_HANDLED;
} }
port = card->ports + channel; port = card->ports + channel;
if (!(port->flags & ASYNC_INITIALIZED)) { if (!(port->flags & ASYNC_INITIALIZED)) {
...@@ -569,7 +570,7 @@ static void isicom_interrupt(int irq, void * dev_id, struct pt_regs * regs) ...@@ -569,7 +570,7 @@ static void isicom_interrupt(int irq, void * dev_id, struct pt_regs * regs)
ClearInterrupt(base); ClearInterrupt(base);
else else
outw(0x0000, base+0x04); /* enable interrupts */ outw(0x0000, base+0x04); /* enable interrupts */
return; return IRQ_HANDLED;
} }
tty = port->tty; tty = port->tty;
...@@ -702,7 +703,7 @@ static void isicom_interrupt(int irq, void * dev_id, struct pt_regs * regs) ...@@ -702,7 +703,7 @@ static void isicom_interrupt(int irq, void * dev_id, struct pt_regs * regs)
ClearInterrupt(base); ClearInterrupt(base);
else else
outw(0x0000, base+0x04); /* enable interrupts */ outw(0x0000, base+0x04); /* enable interrupts */
return; return IRQ_HANDLED;
} }
/* called with interrupts disabled */ /* called with interrupts disabled */
......
...@@ -348,7 +348,7 @@ static void mxser_set_termios(struct tty_struct *, struct termios *); ...@@ -348,7 +348,7 @@ static void mxser_set_termios(struct tty_struct *, struct termios *);
static void mxser_stop(struct tty_struct *); static void mxser_stop(struct tty_struct *);
static void mxser_start(struct tty_struct *); static void mxser_start(struct tty_struct *);
static void mxser_hangup(struct tty_struct *); static void mxser_hangup(struct tty_struct *);
static void mxser_interrupt(int, void *, struct pt_regs *); static irqreturn_t mxser_interrupt(int, void *, struct pt_regs *);
static inline void mxser_receive_chars(struct mxser_struct *, int *); static inline void mxser_receive_chars(struct mxser_struct *, int *);
static inline void mxser_transmit_chars(struct mxser_struct *); static inline void mxser_transmit_chars(struct mxser_struct *);
static inline void mxser_check_modem_status(struct mxser_struct *, int); static inline void mxser_check_modem_status(struct mxser_struct *, int);
...@@ -1362,13 +1362,14 @@ void mxser_hangup(struct tty_struct *tty) ...@@ -1362,13 +1362,14 @@ void mxser_hangup(struct tty_struct *tty)
/* /*
* This is the serial driver's generic interrupt routine * This is the serial driver's generic interrupt routine
*/ */
static void mxser_interrupt(int irq, void *dev_id, struct pt_regs *regs) static irqreturn_t mxser_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{ {
int status, i; int status, i;
struct mxser_struct *info; struct mxser_struct *info;
struct mxser_struct *port; struct mxser_struct *port;
int max, irqbits, bits, msr; int max, irqbits, bits, msr;
int pass_counter = 0; int pass_counter = 0;
int handled = 0;
port = 0; port = 0;
for (i = 0; i < MXSER_BOARDS; i++) { for (i = 0; i < MXSER_BOARDS; i++) {
...@@ -1379,15 +1380,16 @@ static void mxser_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -1379,15 +1380,16 @@ static void mxser_interrupt(int irq, void *dev_id, struct pt_regs *regs)
} }
if (i == MXSER_BOARDS) if (i == MXSER_BOARDS)
return; return IRQ_NONE;
if (port == 0) if (port == 0)
return; return IRQ_NONE;
max = mxser_numports[mxsercfg[i].board_type]; max = mxser_numports[mxsercfg[i].board_type];
while (1) { while (1) {
irqbits = inb(port->vector) & port->vectormask; irqbits = inb(port->vector) & port->vectormask;
if (irqbits == port->vectormask) if (irqbits == port->vectormask)
break; break;
handled = 1;
for (i = 0, bits = 1; i < max; i++, irqbits |= bits, bits <<= 1) { for (i = 0, bits = 1; i < max; i++, irqbits |= bits, bits <<= 1) {
if (irqbits == port->vectormask) if (irqbits == port->vectormask)
break; break;
...@@ -1417,6 +1419,7 @@ static void mxser_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -1417,6 +1419,7 @@ static void mxser_interrupt(int irq, void *dev_id, struct pt_regs *regs)
break; /* Prevent infinite loops */ break; /* Prevent infinite loops */
} }
} }
return IRQ_RETVAL(handled);
} }
static inline void mxser_receive_chars(struct mxser_struct *info, static inline void mxser_receive_chars(struct mxser_struct *info,
......
...@@ -445,7 +445,7 @@ void rio_reset_interrupt (struct Host *HostP) ...@@ -445,7 +445,7 @@ void rio_reset_interrupt (struct Host *HostP)
} }
static void rio_interrupt (int irq, void *ptr, struct pt_regs *regs) static irqreturn_t rio_interrupt (int irq, void *ptr, struct pt_regs *regs)
{ {
struct Host *HostP; struct Host *HostP;
func_enter (); func_enter ();
...@@ -506,7 +506,7 @@ static void rio_interrupt (int irq, void *ptr, struct pt_regs *regs) ...@@ -506,7 +506,7 @@ static void rio_interrupt (int irq, void *ptr, struct pt_regs *regs)
if (test_and_set_bit (RIO_BOARD_INTR_LOCK, &HostP->locks)) { if (test_and_set_bit (RIO_BOARD_INTR_LOCK, &HostP->locks)) {
printk (KERN_ERR "Recursive interrupt! (host %d/irq%d)\n", printk (KERN_ERR "Recursive interrupt! (host %d/irq%d)\n",
(int) ptr, HostP->Ivec); (int) ptr, HostP->Ivec);
return; return IRQ_HANDLED;
} }
RIOServiceHost(p, HostP, irq); RIOServiceHost(p, HostP, irq);
...@@ -518,6 +518,7 @@ static void rio_interrupt (int irq, void *ptr, struct pt_regs *regs) ...@@ -518,6 +518,7 @@ static void rio_interrupt (int irq, void *ptr, struct pt_regs *regs)
rio_dprintk (RIO_DEBUG_IFLOW, "rio: exit rio_interrupt (%d/%d)\n", rio_dprintk (RIO_DEBUG_IFLOW, "rio: exit rio_interrupt (%d/%d)\n",
irq, HostP->Ivec); irq, HostP->Ivec);
func_exit (); func_exit ();
return IRQ_HANDLED;
} }
......
...@@ -590,23 +590,24 @@ static inline void rc_check_modem(struct riscom_board const * bp) ...@@ -590,23 +590,24 @@ static inline void rc_check_modem(struct riscom_board const * bp)
} }
/* The main interrupt processing routine */ /* The main interrupt processing routine */
static void rc_interrupt(int irq, void * dev_id, struct pt_regs * regs) static irqreturn_t rc_interrupt(int irq, void * dev_id, struct pt_regs * regs)
{ {
unsigned char status; unsigned char status;
unsigned char ack; unsigned char ack;
struct riscom_board *bp; struct riscom_board *bp;
unsigned long loop = 0; unsigned long loop = 0;
int handled = 0;
bp = IRQ_to_board[irq]; bp = IRQ_to_board[irq];
if (!bp || !(bp->flags & RC_BOARD_ACTIVE)) { if (!bp || !(bp->flags & RC_BOARD_ACTIVE)) {
return; return IRQ_NONE;
} }
while ((++loop < 16) && ((status = ~(rc_in(bp, RC_BSR))) & while ((++loop < 16) && ((status = ~(rc_in(bp, RC_BSR))) &
(RC_BSR_TOUT | RC_BSR_TINT | (RC_BSR_TOUT | RC_BSR_TINT |
RC_BSR_MINT | RC_BSR_RINT))) { RC_BSR_MINT | RC_BSR_RINT))) {
handled = 1;
if (status & RC_BSR_TOUT) if (status & RC_BSR_TOUT)
printk(KERN_WARNING "rc%d: Got timeout. Hardware " printk(KERN_WARNING "rc%d: Got timeout. Hardware "
"error?\n", board_No(bp)); "error?\n", board_No(bp));
...@@ -648,6 +649,7 @@ static void rc_interrupt(int irq, void * dev_id, struct pt_regs * regs) ...@@ -648,6 +649,7 @@ static void rc_interrupt(int irq, void * dev_id, struct pt_regs * regs)
rc_out(bp, CD180_EOIR, 0); /* Mark end of interrupt */ rc_out(bp, CD180_EOIR, 0); /* Mark end of interrupt */
rc_out(bp, RC_CTOUT, 0); /* Clear timeout flag */ rc_out(bp, RC_CTOUT, 0); /* Clear timeout flag */
} }
return IRQ_RETVAL(handled);
} }
/* /*
......
...@@ -204,7 +204,7 @@ static struct specialix_port sx_port[SX_NBOARD * SX_NPORT]; ...@@ -204,7 +204,7 @@ static struct specialix_port sx_port[SX_NBOARD * SX_NPORT];
#ifdef SPECIALIX_TIMER #ifdef SPECIALIX_TIMER
static struct timer_list missed_irq_timer; static struct timer_list missed_irq_timer;
static void sx_interrupt(int irq, void * dev_id, struct pt_regs * regs); static irqreturn_t sx_interrupt(int irq, void * dev_id, struct pt_regs * regs);
#endif #endif
...@@ -876,7 +876,7 @@ static inline void sx_check_modem(struct specialix_board * bp) ...@@ -876,7 +876,7 @@ static inline void sx_check_modem(struct specialix_board * bp)
/* The main interrupt processing routine */ /* The main interrupt processing routine */
static void sx_interrupt(int irq, void * dev_id, struct pt_regs * regs) static irqreturn_t sx_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{ {
unsigned char status; unsigned char status;
unsigned char ack; unsigned char ack;
...@@ -890,7 +890,7 @@ static void sx_interrupt(int irq, void * dev_id, struct pt_regs * regs) ...@@ -890,7 +890,7 @@ static void sx_interrupt(int irq, void * dev_id, struct pt_regs * regs)
#ifdef SPECIALIX_DEBUG #ifdef SPECIALIX_DEBUG
printk (KERN_DEBUG "sx: False interrupt. irq %d.\n", irq); printk (KERN_DEBUG "sx: False interrupt. irq %d.\n", irq);
#endif #endif
return; return IRQ_NONE;
} }
saved_reg = bp->reg; saved_reg = bp->reg;
...@@ -933,6 +933,7 @@ static void sx_interrupt(int irq, void * dev_id, struct pt_regs * regs) ...@@ -933,6 +933,7 @@ static void sx_interrupt(int irq, void * dev_id, struct pt_regs * regs)
} }
bp->reg = saved_reg; bp->reg = saved_reg;
outb (bp->reg, bp->base + SX_ADDR_REG); outb (bp->reg, bp->base + SX_ADDR_REG);
return IRQ_HANDLED;
} }
......
...@@ -530,7 +530,6 @@ static int stl_getportstruct(unsigned long arg); ...@@ -530,7 +530,6 @@ static int stl_getportstruct(unsigned long arg);
static int stl_getbrdstruct(unsigned long arg); static int stl_getbrdstruct(unsigned long arg);
static int stl_waitcarrier(stlport_t *portp, struct file *filp); static int stl_waitcarrier(stlport_t *portp, struct file *filp);
static void stl_delay(int len); static void stl_delay(int len);
static void stl_intr(int irq, void *dev_id, struct pt_regs *regs);
static void stl_eiointr(stlbrd_t *brdp); static void stl_eiointr(stlbrd_t *brdp);
static void stl_echatintr(stlbrd_t *brdp); static void stl_echatintr(stlbrd_t *brdp);
static void stl_echmcaintr(stlbrd_t *brdp); static void stl_echmcaintr(stlbrd_t *brdp);
...@@ -2085,10 +2084,11 @@ static int stl_readproc(char *page, char **start, off_t off, int count, int *eof ...@@ -2085,10 +2084,11 @@ static int stl_readproc(char *page, char **start, off_t off, int count, int *eof
* calls off to the approrpriate board interrupt handlers. * calls off to the approrpriate board interrupt handlers.
*/ */
static void stl_intr(int irq, void *dev_id, struct pt_regs *regs) static irqreturn_t stl_intr(int irq, void *dev_id, struct pt_regs *regs)
{ {
stlbrd_t *brdp; stlbrd_t *brdp;
int i; int i;
int handled = 0;
#if DEBUG #if DEBUG
printk("stl_intr(irq=%d,regs=%x)\n", irq, (int) regs); printk("stl_intr(irq=%d,regs=%x)\n", irq, (int) regs);
...@@ -2099,8 +2099,10 @@ static void stl_intr(int irq, void *dev_id, struct pt_regs *regs) ...@@ -2099,8 +2099,10 @@ static void stl_intr(int irq, void *dev_id, struct pt_regs *regs)
continue; continue;
if (brdp->state == 0) if (brdp->state == 0)
continue; continue;
handled = 1;
(* brdp->isr)(brdp); (* brdp->isr)(brdp);
} }
return IRQ_RETVAL(handled);
} }
/*****************************************************************************/ /*****************************************************************************/
......
...@@ -1202,7 +1202,7 @@ static inline void sx_check_modem_signals (struct sx_port *port) ...@@ -1202,7 +1202,7 @@ static inline void sx_check_modem_signals (struct sx_port *port)
* Small, elegant, clear. * Small, elegant, clear.
*/ */
static void sx_interrupt (int irq, void *ptr, struct pt_regs *regs) static irqreturn_t sx_interrupt (int irq, void *ptr, struct pt_regs *regs)
{ {
struct sx_board *board = ptr; struct sx_board *board = ptr;
struct sx_port *port; struct sx_port *port;
...@@ -1269,12 +1269,14 @@ static void sx_interrupt (int irq, void *ptr, struct pt_regs *regs) ...@@ -1269,12 +1269,14 @@ static void sx_interrupt (int irq, void *ptr, struct pt_regs *regs)
} }
} }
if (!sx_initialized) return; if (!sx_initialized)
if (!(board->flags & SX_BOARD_INITIALIZED)) return; return IRQ_HANDLED;
if (!(board->flags & SX_BOARD_INITIALIZED))
return IRQ_HANDLED;
if (test_and_set_bit (SX_BOARD_INTR_LOCK, &board->locks)) { if (test_and_set_bit (SX_BOARD_INTR_LOCK, &board->locks)) {
printk (KERN_ERR "Recursive interrupt! (%d)\n", board->irq); printk (KERN_ERR "Recursive interrupt! (%d)\n", board->irq);
return; return IRQ_HANDLED;
} }
for (i=0;i<board->nports;i++) { for (i=0;i<board->nports;i++) {
...@@ -1298,6 +1300,7 @@ static void sx_interrupt (int irq, void *ptr, struct pt_regs *regs) ...@@ -1298,6 +1300,7 @@ static void sx_interrupt (int irq, void *ptr, struct pt_regs *regs)
sx_dprintk (SX_DEBUG_FLOW, "sx: exit sx_interrupt (%d/%d)\n", irq, board->irq); sx_dprintk (SX_DEBUG_FLOW, "sx: exit sx_interrupt (%d/%d)\n", irq, board->irq);
/* func_exit (); */ /* func_exit (); */
return IRQ_HANDLED;
} }
......
...@@ -1704,7 +1704,7 @@ void mgsl_isr_transmit_dma( struct mgsl_struct *info ) ...@@ -1704,7 +1704,7 @@ void mgsl_isr_transmit_dma( struct mgsl_struct *info )
* *
* Return Value: None * Return Value: None
*/ */
static void mgsl_interrupt(int irq, void *dev_id, struct pt_regs * regs) static irqreturn_t mgsl_interrupt(int irq, void *dev_id, struct pt_regs * regs)
{ {
struct mgsl_struct * info; struct mgsl_struct * info;
u16 UscVector; u16 UscVector;
...@@ -1716,7 +1716,7 @@ static void mgsl_interrupt(int irq, void *dev_id, struct pt_regs * regs) ...@@ -1716,7 +1716,7 @@ static void mgsl_interrupt(int irq, void *dev_id, struct pt_regs * regs)
info = (struct mgsl_struct *)dev_id; info = (struct mgsl_struct *)dev_id;
if (!info) if (!info)
return; return IRQ_NONE;
spin_lock(&info->irq_spinlock); spin_lock(&info->irq_spinlock);
...@@ -1766,7 +1766,7 @@ static void mgsl_interrupt(int irq, void *dev_id, struct pt_regs * regs) ...@@ -1766,7 +1766,7 @@ static void mgsl_interrupt(int irq, void *dev_id, struct pt_regs * regs)
if ( debug_level >= DEBUG_LEVEL_ISR ) if ( debug_level >= DEBUG_LEVEL_ISR )
printk("%s(%d):mgsl_interrupt(%d)exit.\n", printk("%s(%d):mgsl_interrupt(%d)exit.\n",
__FILE__,__LINE__,irq); __FILE__,__LINE__,irq);
return IRQ_HANDLED;
} /* end of mgsl_interrupt() */ } /* end of mgsl_interrupt() */
/* startup() /* startup()
......
...@@ -652,7 +652,6 @@ static void isr_rxdmaerror(SLMP_INFO *info); ...@@ -652,7 +652,6 @@ static void isr_rxdmaerror(SLMP_INFO *info);
static void isr_txdmaok(SLMP_INFO *info); static void isr_txdmaok(SLMP_INFO *info);
static void isr_txdmaerror(SLMP_INFO *info); static void isr_txdmaerror(SLMP_INFO *info);
static void isr_io_pin(SLMP_INFO *info, u16 status); static void isr_io_pin(SLMP_INFO *info, u16 status);
static void synclinkmp_interrupt(int irq, void *dev_id, struct pt_regs * regs);
static int alloc_dma_bufs(SLMP_INFO *info); static int alloc_dma_bufs(SLMP_INFO *info);
static void free_dma_bufs(SLMP_INFO *info); static void free_dma_bufs(SLMP_INFO *info);
...@@ -2446,7 +2445,8 @@ void isr_io_pin( SLMP_INFO *info, u16 status ) ...@@ -2446,7 +2445,8 @@ void isr_io_pin( SLMP_INFO *info, u16 status )
* dev_id device ID supplied during interrupt registration * dev_id device ID supplied during interrupt registration
* regs interrupted processor context * regs interrupted processor context
*/ */
static void synclinkmp_interrupt(int irq, void *dev_id, struct pt_regs * regs) static irqreturn_t synclinkmp_interrupt(int irq, void *dev_id,
struct pt_regs *regs)
{ {
SLMP_INFO * info; SLMP_INFO * info;
unsigned char status, status0, status1=0; unsigned char status, status0, status1=0;
...@@ -2462,7 +2462,7 @@ static void synclinkmp_interrupt(int irq, void *dev_id, struct pt_regs * regs) ...@@ -2462,7 +2462,7 @@ static void synclinkmp_interrupt(int irq, void *dev_id, struct pt_regs * regs)
info = (SLMP_INFO *)dev_id; info = (SLMP_INFO *)dev_id;
if (!info) if (!info)
return; return IRQ_NONE;
spin_lock(&info->lock); spin_lock(&info->lock);
...@@ -2564,6 +2564,7 @@ static void synclinkmp_interrupt(int irq, void *dev_id, struct pt_regs * regs) ...@@ -2564,6 +2564,7 @@ static void synclinkmp_interrupt(int irq, void *dev_id, struct pt_regs * regs)
if ( debug_level >= DEBUG_LEVEL_ISR ) if ( debug_level >= DEBUG_LEVEL_ISR )
printk("%s(%d):synclinkmp_interrupt(%d)exit.\n", printk("%s(%d):synclinkmp_interrupt(%d)exit.\n",
__FILE__,__LINE__,irq); __FILE__,__LINE__,irq);
return IRQ_HANDLED;
} }
/* Initialize and start device. /* Initialize and start device.
......
...@@ -1604,7 +1604,7 @@ static void qic02_tape_times_out(unsigned long dummy) ...@@ -1604,7 +1604,7 @@ static void qic02_tape_times_out(unsigned long dummy)
* When we are finished, set flags to indicate end, disable timer. * When we are finished, set flags to indicate end, disable timer.
* NOTE: This *must* be fast! * NOTE: This *must* be fast!
*/ */
static void qic02_tape_interrupt(int irq, void *dev_id, static irqreturn_t qic02_tape_interrupt(int irq, void *dev_id,
struct pt_regs *regs) struct pt_regs *regs)
{ {
int stat, r, i; int stat, r, i;
...@@ -1622,7 +1622,7 @@ static void qic02_tape_interrupt(int irq, void *dev_id, ...@@ -1622,7 +1622,7 @@ static void qic02_tape_interrupt(int irq, void *dev_id,
if (((stat & (AR_STAT_DMADONE)) == 0) && if (((stat & (AR_STAT_DMADONE)) == 0) &&
((stat & (QIC02_STAT_EXCEPTION)) != 0)) { ((stat & (QIC02_STAT_EXCEPTION)) != 0)) {
TIMERCONT; TIMERCONT;
return; /* "Linux with IRQ sharing" */ return IRQ_NONE;/* "Linux with IRQ sharing" */
} }
} }
...@@ -1642,7 +1642,7 @@ static void qic02_tape_interrupt(int irq, void *dev_id, ...@@ -1642,7 +1642,7 @@ static void qic02_tape_interrupt(int irq, void *dev_id,
dma_mode = 0; /* wake up rw() */ dma_mode = 0; /* wake up rw() */
status_expect_int = NO; status_expect_int = NO;
wake_up(&qic02_tape_transfer); wake_up(&qic02_tape_transfer);
return; return IRQ_HANDLED;
} }
/* return if tape controller not ready, or /* return if tape controller not ready, or
* if dma channel hasn't finished last byte yet. * if dma channel hasn't finished last byte yet.
...@@ -1668,7 +1668,7 @@ static void qic02_tape_interrupt(int irq, void *dev_id, ...@@ -1668,7 +1668,7 @@ static void qic02_tape_interrupt(int irq, void *dev_id,
release_dma_lock(flags); release_dma_lock(flags);
if (r) if (r)
return; return IRQ_HANDLED;
/* finish DMA cycle */ /* finish DMA cycle */
...@@ -1688,6 +1688,7 @@ static void qic02_tape_interrupt(int irq, void *dev_id, ...@@ -1688,6 +1688,7 @@ static void qic02_tape_interrupt(int irq, void *dev_id,
} else { } else {
printk(TPQIC02_NAME ": Unexpected interrupt, stat == %x\n", inb(QIC02_STAT_PORT)); printk(TPQIC02_NAME ": Unexpected interrupt, stat == %x\n", inb(QIC02_STAT_PORT));
} }
return IRQ_HANDLED;
} /* qic02_tape_interrupt */ } /* qic02_tape_interrupt */
......
...@@ -679,7 +679,7 @@ static int hd_ioctl(struct inode * inode, struct file * file, ...@@ -679,7 +679,7 @@ static int hd_ioctl(struct inode * inode, struct file * file,
* be forgotten about... * be forgotten about...
*/ */
static void hd_interrupt(int irq, void *dev_id, struct pt_regs *regs) static irqreturn_t hd_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{ {
void (*handler)(void) = do_hd; void (*handler)(void) = do_hd;
...@@ -689,6 +689,7 @@ static void hd_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -689,6 +689,7 @@ static void hd_interrupt(int irq, void *dev_id, struct pt_regs *regs)
handler = unexpected_hd_interrupt; handler = unexpected_hd_interrupt;
handler(); handler();
local_irq_enable(); local_irq_enable();
return IRQ_HANDLED;
} }
static struct block_device_operations hd_fops = { static struct block_device_operations hd_fops = {
......
...@@ -509,22 +509,23 @@ diva_xdi_read(void *adapter, void *os_handle, void *dst, ...@@ -509,22 +509,23 @@ diva_xdi_read(void *adapter, void *os_handle, void *dst,
} }
void diva_os_irq_wrapper(int irq, void *context, struct pt_regs *regs) irqreturn_t diva_os_irq_wrapper(int irq, void *context, struct pt_regs *regs)
{ {
diva_os_xdi_adapter_t *a = (diva_os_xdi_adapter_t *) context; diva_os_xdi_adapter_t *a = (diva_os_xdi_adapter_t *) context;
diva_xdi_clear_interrupts_proc_t clear_int_proc; diva_xdi_clear_interrupts_proc_t clear_int_proc;
if (!a || !a->xdi_adapter.diva_isr_handler) { if (!a || !a->xdi_adapter.diva_isr_handler) {
return; return IRQ_NONE;
} }
if ((clear_int_proc = a->clear_interrupts_proc)) { if ((clear_int_proc = a->clear_interrupts_proc)) {
(*clear_int_proc) (a); (*clear_int_proc) (a);
a->clear_interrupts_proc = 0; a->clear_interrupts_proc = 0;
return; return IRQ_HANDLED;
} }
(*(a->xdi_adapter.diva_isr_handler)) (&a->xdi_adapter); (*(a->xdi_adapter.diva_isr_handler)) (&a->xdi_adapter);
return IRQ_HANDLED;
} }
static void diva_init_request_array(void) static void diva_init_request_array(void)
......
...@@ -61,7 +61,7 @@ static char *DRIVERNAME = ...@@ -61,7 +61,7 @@ static char *DRIVERNAME =
static char *DRIVERLNAME = "divas"; static char *DRIVERLNAME = "divas";
char *DRIVERRELEASE = "2.0"; char *DRIVERRELEASE = "2.0";
extern void diva_os_irq_wrapper(int irq, void *context, extern irqreturn_t diva_os_irq_wrapper(int irq, void *context,
struct pt_regs *regs); struct pt_regs *regs);
extern int create_divas_proc(void); extern int create_divas_proc(void);
extern void remove_divas_proc(void); extern void remove_divas_proc(void);
......
...@@ -3463,10 +3463,11 @@ static void i2o_pci_dispose(struct i2o_controller *c) ...@@ -3463,10 +3463,11 @@ static void i2o_pci_dispose(struct i2o_controller *c)
* to be rather simple. We keep the controller pointer in the cookie. * to be rather simple. We keep the controller pointer in the cookie.
*/ */
static void i2o_pci_interrupt(int irq, void *dev_id, struct pt_regs *r) static irqreturn_t i2o_pci_interrupt(int irq, void *dev_id, struct pt_regs *r)
{ {
struct i2o_controller *c = dev_id; struct i2o_controller *c = dev_id;
i2o_run_queue(c); i2o_run_queue(c);
return IRQ_HANDLED;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment