whenever the card wants its hand held--chars
received, out buffer empty, modem change, etc.
*/
-static void
+static irqreturn_t
cyy_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
struct tty_struct *tty;
#ifdef CY_DEBUG_INTERRUPTS
printk("cyy_interrupt: spurious interrupt %d\n\r", irq);
#endif
- return; /* spurious interrupt */
+ return IRQ_NONE; /* spurious interrupt */
}
card_base_addr = (unsigned char *)cinfo->base_addr;
cy_writeb((u_long)card_base_addr + (Cy_ClrIntr<<index), 0);
/* Cy_ClrIntr is 0x1800 */
spin_unlock(&cinfo->card_lock);
+ return IRQ_HANDLED;
} /* cyy_interrupt */
/***********************************************************/
}
#ifdef CONFIG_CYZ_INTR
-static void
+static irqreturn_t
cyz_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
struct cyclades_card *cinfo;
#ifdef CY_DEBUG_INTERRUPTS
printk("cyz_interrupt: spurious interrupt %d\n\r", irq);
#endif
- return; /* spurious interrupt */
+ return IRQ_NONE; /* spurious interrupt */
}
if (!ISZLOADED(*cinfo)) {
#ifdef CY_DEBUG_INTERRUPTS
printk("cyz_interrupt: board not yet loaded (IRQ%d).\n\r", irq);
#endif
- return;
+ return IRQ_NONE;
}
/* Handle the interrupts */
cyz_handle_cmd(cinfo);
- return;
+ return IRQ_HANDLED;
} /* cyz_interrupt */
static void
/*
* 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;
unsigned err_status;
if (!info->tty) {
sti();
- return;
+ return IRQ_NONE;
}
if (scratch & 0x04) { /* error */
printk("end.\n");
#endif
sti();
+ return IRQ_HANDLED;
}
/*
static void set_irq(int, int);
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 inline void service_all_boards(void);
static void do_input(void *p);
/* */
/* */
/******************************************************************************/
-static void
+static irqreturn_t
ip2_interrupt(int irq, void *dev_id, struct pt_regs * regs)
{
int i;
i2eBordStrPtr pB;
+ int handled = 0;
ip2trace (ITRC_NO_PORT, ITRC_INTR, 99, 1, irq );
// IRQ = 0 for polled boards, we won't poll "IRQ" boards
if ( pB && (pB->i2eUsingIrq == irq) ) {
+ handled = 1;
#ifdef USE_IQI
if (NO_MAIL_HERE != ( pB->i2eStartMail = iiGetMail(pB))) {
++irq_counter;
ip2trace (ITRC_NO_PORT, ITRC_INTR, ITRC_RETURN, 0 );
+ return IRQ_RETVAL(handled);
}
/******************************************************************************/
}
/* 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_port * port;
if (!card || !(card->status & FIRMWARE_LOADED)) {
/* printk(KERN_DEBUG "ISICOM: interrupt: not handling irq%d!.\n", irq);*/
- return;
+ return IRQ_NONE;
}
base = card->base;
ClearInterrupt(base);
else
outw(0x0000, base+0x04); /* enable interrupts */
- return;
+ return IRQ_HANDLED;
}
port = card->ports + channel;
if (!(port->flags & ASYNC_INITIALIZED)) {
ClearInterrupt(base);
else
outw(0x0000, base+0x04); /* enable interrupts */
- return;
+ return IRQ_HANDLED;
}
tty = port->tty;
ClearInterrupt(base);
else
outw(0x0000, base+0x04); /* enable interrupts */
- return;
+ return IRQ_HANDLED;
}
/* called with interrupts disabled */
static void mxser_stop(struct tty_struct *);
static void mxser_start(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_transmit_chars(struct mxser_struct *);
static inline void mxser_check_modem_status(struct mxser_struct *, int);
/*
* 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;
struct mxser_struct *info;
struct mxser_struct *port;
int max, irqbits, bits, msr;
int pass_counter = 0;
+ int handled = 0;
port = 0;
for (i = 0; i < MXSER_BOARDS; i++) {
}
if (i == MXSER_BOARDS)
- return;
+ return IRQ_NONE;
if (port == 0)
- return;
+ return IRQ_NONE;
max = mxser_numports[mxsercfg[i].board_type];
while (1) {
irqbits = inb(port->vector) & port->vectormask;
if (irqbits == port->vectormask)
break;
+ handled = 1;
for (i = 0, bits = 1; i < max; i++, irqbits |= bits, bits <<= 1) {
if (irqbits == port->vectormask)
break;
break; /* Prevent infinite loops */
}
}
+ return IRQ_RETVAL(handled);
}
static inline void mxser_receive_chars(struct mxser_struct *info,
}
-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;
func_enter ();
if (test_and_set_bit (RIO_BOARD_INTR_LOCK, &HostP->locks)) {
printk (KERN_ERR "Recursive interrupt! (host %d/irq%d)\n",
(int) ptr, HostP->Ivec);
- return;
+ return IRQ_HANDLED;
}
RIOServiceHost(p, HostP, irq);
rio_dprintk (RIO_DEBUG_IFLOW, "rio: exit rio_interrupt (%d/%d)\n",
irq, HostP->Ivec);
func_exit ();
+ return IRQ_HANDLED;
}
}
/* 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 ack;
struct riscom_board *bp;
unsigned long loop = 0;
-
+ int handled = 0;
+
bp = IRQ_to_board[irq];
if (!bp || !(bp->flags & RC_BOARD_ACTIVE)) {
- return;
+ return IRQ_NONE;
}
while ((++loop < 16) && ((status = ~(rc_in(bp, RC_BSR))) &
(RC_BSR_TOUT | RC_BSR_TINT |
RC_BSR_MINT | RC_BSR_RINT))) {
-
+ handled = 1;
if (status & RC_BSR_TOUT)
printk(KERN_WARNING "rc%d: Got timeout. Hardware "
"error?\n", board_No(bp));
rc_out(bp, CD180_EOIR, 0); /* Mark end of interrupt */
rc_out(bp, RC_CTOUT, 0); /* Clear timeout flag */
}
+ return IRQ_RETVAL(handled);
}
/*
#ifdef SPECIALIX_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
/* 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 ack;
#ifdef SPECIALIX_DEBUG
printk (KERN_DEBUG "sx: False interrupt. irq %d.\n", irq);
#endif
- return;
+ return IRQ_NONE;
}
saved_reg = bp->reg;
}
bp->reg = saved_reg;
outb (bp->reg, bp->base + SX_ADDR_REG);
+ return IRQ_HANDLED;
}
static int stl_getbrdstruct(unsigned long arg);
static int stl_waitcarrier(stlport_t *portp, struct file *filp);
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_echatintr(stlbrd_t *brdp);
static void stl_echmcaintr(stlbrd_t *brdp);
* 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;
int i;
+ int handled = 0;
#if DEBUG
printk("stl_intr(irq=%d,regs=%x)\n", irq, (int) regs);
continue;
if (brdp->state == 0)
continue;
+ handled = 1;
(* brdp->isr)(brdp);
}
+ return IRQ_RETVAL(handled);
}
/*****************************************************************************/
* 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_port *port;
}
}
- if (!sx_initialized) return;
- if (!(board->flags & SX_BOARD_INITIALIZED)) return;
+ if (!sx_initialized)
+ return IRQ_HANDLED;
+ if (!(board->flags & SX_BOARD_INITIALIZED))
+ return IRQ_HANDLED;
if (test_and_set_bit (SX_BOARD_INTR_LOCK, &board->locks)) {
printk (KERN_ERR "Recursive interrupt! (%d)\n", board->irq);
- return;
+ return IRQ_HANDLED;
}
for (i=0;i<board->nports;i++) {
sx_dprintk (SX_DEBUG_FLOW, "sx: exit sx_interrupt (%d/%d)\n", irq, board->irq);
/* func_exit (); */
+ return IRQ_HANDLED;
}
*
* 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;
u16 UscVector;
info = (struct mgsl_struct *)dev_id;
if (!info)
- return;
+ return IRQ_NONE;
spin_lock(&info->irq_spinlock);
if ( debug_level >= DEBUG_LEVEL_ISR )
printk("%s(%d):mgsl_interrupt(%d)exit.\n",
__FILE__,__LINE__,irq);
-
+ return IRQ_HANDLED;
} /* end of mgsl_interrupt() */
/* startup()
static void isr_txdmaok(SLMP_INFO *info);
static void isr_txdmaerror(SLMP_INFO *info);
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 void free_dma_bufs(SLMP_INFO *info);
* dev_id device ID supplied during interrupt registration
* 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;
unsigned char status, status0, status1=0;
info = (SLMP_INFO *)dev_id;
if (!info)
- return;
+ return IRQ_NONE;
spin_lock(&info->lock);
if ( debug_level >= DEBUG_LEVEL_ISR )
printk("%s(%d):synclinkmp_interrupt(%d)exit.\n",
__FILE__,__LINE__,irq);
+ return IRQ_HANDLED;
}
/* Initialize and start device.
* When we are finished, set flags to indicate end, disable timer.
* 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)
{
int stat, r, i;
if (((stat & (AR_STAT_DMADONE)) == 0) &&
((stat & (QIC02_STAT_EXCEPTION)) != 0)) {
TIMERCONT;
- return; /* "Linux with IRQ sharing" */
+ return IRQ_NONE;/* "Linux with IRQ sharing" */
}
}
dma_mode = 0; /* wake up rw() */
status_expect_int = NO;
wake_up(&qic02_tape_transfer);
- return;
+ return IRQ_HANDLED;
}
/* return if tape controller not ready, or
* if dma channel hasn't finished last byte yet.
release_dma_lock(flags);
if (r)
- return;
+ return IRQ_HANDLED;
/* finish DMA cycle */
} else {
printk(TPQIC02_NAME ": Unexpected interrupt, stat == %x\n", inb(QIC02_STAT_PORT));
}
+ return IRQ_HANDLED;
} /* qic02_tape_interrupt */
* 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;
handler = unexpected_hd_interrupt;
handler();
local_irq_enable();
+ return IRQ_HANDLED;
}
static struct block_device_operations hd_fops = {
}
-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_xdi_clear_interrupts_proc_t clear_int_proc;
if (!a || !a->xdi_adapter.diva_isr_handler) {
- return;
+ return IRQ_NONE;
}
if ((clear_int_proc = a->clear_interrupts_proc)) {
(*clear_int_proc) (a);
a->clear_interrupts_proc = 0;
- return;
+ return IRQ_HANDLED;
}
(*(a->xdi_adapter.diva_isr_handler)) (&a->xdi_adapter);
+ return IRQ_HANDLED;
}
static void diva_init_request_array(void)
static char *DRIVERLNAME = "divas";
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);
extern int create_divas_proc(void);
extern void remove_divas_proc(void);
* 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;
i2o_run_queue(c);
+ return IRQ_HANDLED;
}
/**