Commit c007c1ed authored by Andrew Morton's avatar Andrew Morton Committed by Christoph Hellwig

[PATCH] irqs: IRDA

Some IRQ udpates for IRDA which seemed to get lost.
parent 6e9f0111
...@@ -95,7 +95,6 @@ static int ali_ircc_net_close(struct net_device *dev); ...@@ -95,7 +95,6 @@ static int ali_ircc_net_close(struct net_device *dev);
static int ali_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); static int ali_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
static int ali_ircc_pmproc(struct pm_dev *dev, pm_request_t rqst, void *data); static int ali_ircc_pmproc(struct pm_dev *dev, pm_request_t rqst, void *data);
static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud); static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud);
static void ali_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static void ali_ircc_suspend(struct ali_ircc_cb *self); static void ali_ircc_suspend(struct ali_ircc_cb *self);
static void ali_ircc_wakeup(struct ali_ircc_cb *self); static void ali_ircc_wakeup(struct ali_ircc_cb *self);
static struct net_device_stats *ali_ircc_net_get_stats(struct net_device *dev); static struct net_device_stats *ali_ircc_net_get_stats(struct net_device *dev);
...@@ -632,7 +631,8 @@ static int ali_ircc_read_dongle_id (int i, chipio_t *info) ...@@ -632,7 +631,8 @@ static int ali_ircc_read_dongle_id (int i, chipio_t *info)
* An interrupt from the chip has arrived. Time to do some work * An interrupt from the chip has arrived. Time to do some work
* *
*/ */
static void ali_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs) static irqreturn_t ali_ircc_interrupt(int irq, void *dev_id,
struct pt_regs *regs)
{ {
struct net_device *dev = (struct net_device *) dev_id; struct net_device *dev = (struct net_device *) dev_id;
struct ali_ircc_cb *self; struct ali_ircc_cb *self;
...@@ -641,7 +641,7 @@ static void ali_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -641,7 +641,7 @@ static void ali_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
if (!dev) { if (!dev) {
WARNING("%s: irq %d for unknown device.\n", driver_name, irq); WARNING("%s: irq %d for unknown device.\n", driver_name, irq);
return; return IRQ_NONE;
} }
self = (struct ali_ircc_cb *) dev->priv; self = (struct ali_ircc_cb *) dev->priv;
...@@ -657,6 +657,7 @@ static void ali_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -657,6 +657,7 @@ static void ali_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
spin_unlock(&self->lock); spin_unlock(&self->lock);
IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__); IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__);
return IRQ_HANDLED;
} }
/* /*
* Function ali_ircc_fir_interrupt(irq, struct ali_ircc_cb *self, regs) * Function ali_ircc_fir_interrupt(irq, struct ali_ircc_cb *self, regs)
......
...@@ -745,20 +745,20 @@ STATIC int toshoboe_invalid_dev(int irq) ...@@ -745,20 +745,20 @@ STATIC int toshoboe_invalid_dev(int irq)
return 1; return 1;
} }
STATIC void STATIC irqreturn_t
toshoboe_probeinterrupt (int irq, void *dev_id, struct pt_regs *regs) toshoboe_probeinterrupt (int irq, void *dev_id, struct pt_regs *regs)
{ {
struct toshoboe_cb *self = (struct toshoboe_cb *) dev_id; struct toshoboe_cb *self = (struct toshoboe_cb *) dev_id;
__u8 irqstat; __u8 irqstat;
if (self == NULL && toshoboe_invalid_dev(irq)) if (self == NULL && toshoboe_invalid_dev(irq))
return; return IRQ_NONE;
irqstat = INB (OBOE_ISR); irqstat = INB (OBOE_ISR);
/* was it us */ /* was it us */
if (!(irqstat & OBOE_INT_MASK)) if (!(irqstat & OBOE_INT_MASK))
return; return IRQ_NONE;
/* Ack all the interrupts */ /* Ack all the interrupts */
OUTB (irqstat, OBOE_ISR); OUTB (irqstat, OBOE_ISR);
...@@ -791,6 +791,7 @@ toshoboe_probeinterrupt (int irq, void *dev_id, struct pt_regs *regs) ...@@ -791,6 +791,7 @@ toshoboe_probeinterrupt (int irq, void *dev_id, struct pt_regs *regs)
if (irqstat & OBOE_INT_SIP) { if (irqstat & OBOE_INT_SIP) {
self->int_sip++; self->int_sip++;
PROBE_DEBUG("I"); } PROBE_DEBUG("I"); }
return IRQ_HANDLED;
} }
STATIC int STATIC int
......
...@@ -131,7 +131,6 @@ static int nsc_ircc_hard_xmit_fir(struct sk_buff *skb, struct net_device *dev); ...@@ -131,7 +131,6 @@ static int nsc_ircc_hard_xmit_fir(struct sk_buff *skb, struct net_device *dev);
static int nsc_ircc_pio_write(int iobase, __u8 *buf, int len, int fifo_size); static int nsc_ircc_pio_write(int iobase, __u8 *buf, int len, int fifo_size);
static void nsc_ircc_dma_xmit(struct nsc_ircc_cb *self, int iobase); static void nsc_ircc_dma_xmit(struct nsc_ircc_cb *self, int iobase);
static __u8 nsc_ircc_change_speed(struct nsc_ircc_cb *self, __u32 baud); static __u8 nsc_ircc_change_speed(struct nsc_ircc_cb *self, __u32 baud);
static void nsc_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static int nsc_ircc_is_receiving(struct nsc_ircc_cb *self); static int nsc_ircc_is_receiving(struct nsc_ircc_cb *self);
static int nsc_ircc_read_dongle_id (int iobase); static int nsc_ircc_read_dongle_id (int iobase);
static void nsc_ircc_init_dongle_interface (int iobase, int dongle_id); static void nsc_ircc_init_dongle_interface (int iobase, int dongle_id);
...@@ -1781,7 +1780,8 @@ static void nsc_ircc_fir_interrupt(struct nsc_ircc_cb *self, int iobase, ...@@ -1781,7 +1780,8 @@ static void nsc_ircc_fir_interrupt(struct nsc_ircc_cb *self, int iobase,
* An interrupt from the chip has arrived. Time to do some work * An interrupt from the chip has arrived. Time to do some work
* *
*/ */
static void nsc_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs) static irqreturn_t nsc_ircc_interrupt(int irq, void *dev_id,
struct pt_regs *regs)
{ {
struct net_device *dev = (struct net_device *) dev_id; struct net_device *dev = (struct net_device *) dev_id;
struct nsc_ircc_cb *self; struct nsc_ircc_cb *self;
...@@ -1790,7 +1790,7 @@ static void nsc_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -1790,7 +1790,7 @@ static void nsc_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
if (!dev) { if (!dev) {
WARNING("%s: irq %d for unknown device.\n", driver_name, irq); WARNING("%s: irq %d for unknown device.\n", driver_name, irq);
return; return IRQ_NONE;
} }
self = (struct nsc_ircc_cb *) dev->priv; self = (struct nsc_ircc_cb *) dev->priv;
...@@ -1818,6 +1818,7 @@ static void nsc_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -1818,6 +1818,7 @@ static void nsc_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
outb(bsr, iobase+BSR); /* Restore bank register */ outb(bsr, iobase+BSR); /* Restore bank register */
spin_unlock(&self->lock); spin_unlock(&self->lock);
return IRQ_HANDLED;
} }
/* /*
......
...@@ -992,9 +992,9 @@ static irqreturn_t ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -992,9 +992,9 @@ static irqreturn_t ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
return IRQ_NONE; return IRQ_NONE;
} }
irport = (struct irport_cb *) dev->priv; irport = (struct irport_cb *) dev->priv;
ASSERT(irport != NULL, return;); ASSERT(irport != NULL, return IRQ_NONE;);
self = (struct ircc_cb *) irport->priv; self = (struct ircc_cb *) irport->priv;
ASSERT(self != NULL, return;); ASSERT(self != NULL, return IRQ_NONE;);
/* Check if we should use the SIR interrupt handler */ /* Check if we should use the SIR interrupt handler */
if (self->io->speed < 576000) { if (self->io->speed < 576000) {
......
...@@ -349,7 +349,7 @@ toshoboe_hard_xmit (struct sk_buff *skb, struct net_device *dev) ...@@ -349,7 +349,7 @@ toshoboe_hard_xmit (struct sk_buff *skb, struct net_device *dev)
} }
/*interrupt handler */ /*interrupt handler */
static void static irqreturn_t
toshoboe_interrupt (int irq, void *dev_id, struct pt_regs *regs) toshoboe_interrupt (int irq, void *dev_id, struct pt_regs *regs)
{ {
struct toshoboe_cb *self = (struct toshoboe_cb *) dev_id; struct toshoboe_cb *self = (struct toshoboe_cb *) dev_id;
...@@ -360,7 +360,7 @@ toshoboe_interrupt (int irq, void *dev_id, struct pt_regs *regs) ...@@ -360,7 +360,7 @@ toshoboe_interrupt (int irq, void *dev_id, struct pt_regs *regs)
{ {
printk (KERN_WARNING "%s: irq %d for unknown device.\n", printk (KERN_WARNING "%s: irq %d for unknown device.\n",
driver_name, irq); driver_name, irq);
return; return IRQ_NONE;
} }
IRDA_DEBUG (4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG (4, "%s()\n", __FUNCTION__ );
...@@ -369,7 +369,7 @@ toshoboe_interrupt (int irq, void *dev_id, struct pt_regs *regs) ...@@ -369,7 +369,7 @@ toshoboe_interrupt (int irq, void *dev_id, struct pt_regs *regs)
/* woz it us */ /* woz it us */
if (!(irqstat & 0xf8)) if (!(irqstat & 0xf8))
return; return IRQ_NONE;
outb_p (irqstat, OBOE_ISR); /*Acknologede it */ outb_p (irqstat, OBOE_ISR); /*Acknologede it */
...@@ -456,8 +456,7 @@ toshoboe_interrupt (int irq, void *dev_id, struct pt_regs *regs) ...@@ -456,8 +456,7 @@ toshoboe_interrupt (int irq, void *dev_id, struct pt_regs *regs)
self->stats.rx_errors++; self->stats.rx_errors++;
} }
return IRQ_HANDLED;
} }
static int static int
......
...@@ -1570,7 +1570,8 @@ static int vlsi_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd) ...@@ -1570,7 +1570,8 @@ static int vlsi_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd)
/********************************************************/ /********************************************************/
static void vlsi_interrupt(int irq, void *dev_instance, struct pt_regs *regs) static irqreturn_t vlsi_interrupt(int irq, void *dev_instance,
struct pt_regs *regs)
{ {
struct net_device *ndev = dev_instance; struct net_device *ndev = dev_instance;
vlsi_irda_dev_t *idev = ndev->priv; vlsi_irda_dev_t *idev = ndev->priv;
...@@ -1579,6 +1580,7 @@ static void vlsi_interrupt(int irq, void *dev_instance, struct pt_regs *regs) ...@@ -1579,6 +1580,7 @@ static void vlsi_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
int boguscount = 32; int boguscount = 32;
unsigned got_act; unsigned got_act;
unsigned long flags; unsigned long flags;
int handled = 0;
got_act = 0; got_act = 0;
iobase = ndev->base_addr; iobase = ndev->base_addr;
...@@ -1591,7 +1593,7 @@ static void vlsi_interrupt(int irq, void *dev_instance, struct pt_regs *regs) ...@@ -1591,7 +1593,7 @@ static void vlsi_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
if (!(irintr&=IRINTR_INT_MASK)) /* not our INT - probably shared */ if (!(irintr&=IRINTR_INT_MASK)) /* not our INT - probably shared */
break; break;
handled = 1;
if (irintr&IRINTR_RPKTINT) if (irintr&IRINTR_RPKTINT)
vlsi_rx_interrupt(ndev); vlsi_rx_interrupt(ndev);
...@@ -1610,7 +1612,7 @@ static void vlsi_interrupt(int irq, void *dev_instance, struct pt_regs *regs) ...@@ -1610,7 +1612,7 @@ static void vlsi_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
if (boguscount <= 0) if (boguscount <= 0)
printk(KERN_WARNING "%s: too much work in interrupt!\n", __FUNCTION__); printk(KERN_WARNING "%s: too much work in interrupt!\n", __FUNCTION__);
return IRQ_RETVAL(handled);
} }
/********************************************************/ /********************************************************/
......
...@@ -97,7 +97,6 @@ static int w83977af_hard_xmit(struct sk_buff *skb, struct net_device *dev); ...@@ -97,7 +97,6 @@ static int w83977af_hard_xmit(struct sk_buff *skb, struct net_device *dev);
static int w83977af_pio_write(int iobase, __u8 *buf, int len, int fifo_size); static int w83977af_pio_write(int iobase, __u8 *buf, int len, int fifo_size);
static void w83977af_dma_write(struct w83977af_ir *self, int iobase); static void w83977af_dma_write(struct w83977af_ir *self, int iobase);
static void w83977af_change_speed(struct w83977af_ir *self, __u32 speed); static void w83977af_change_speed(struct w83977af_ir *self, __u32 speed);
static void w83977af_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static int w83977af_is_receiving(struct w83977af_ir *self); static int w83977af_is_receiving(struct w83977af_ir *self);
static int w83977af_net_init(struct net_device *dev); static int w83977af_net_init(struct net_device *dev);
...@@ -1118,7 +1117,8 @@ static __u8 w83977af_fir_interrupt(struct w83977af_ir *self, int isr) ...@@ -1118,7 +1117,8 @@ static __u8 w83977af_fir_interrupt(struct w83977af_ir *self, int isr)
* An interrupt from the chip has arrived. Time to do some work * An interrupt from the chip has arrived. Time to do some work
* *
*/ */
static void w83977af_interrupt(int irq, void *dev_id, struct pt_regs *regs) static irqreturn_t w83977af_interrupt(int irq, void *dev_id,
struct pt_regs *regs)
{ {
struct net_device *dev = (struct net_device *) dev_id; struct net_device *dev = (struct net_device *) dev_id;
struct w83977af_ir *self; struct w83977af_ir *self;
...@@ -1128,7 +1128,7 @@ static void w83977af_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -1128,7 +1128,7 @@ static void w83977af_interrupt(int irq, void *dev_id, struct pt_regs *regs)
if (!dev) { if (!dev) {
printk(KERN_WARNING "%s: irq %d for unknown device.\n", printk(KERN_WARNING "%s: irq %d for unknown device.\n",
driver_name, irq); driver_name, irq);
return; return IRQ_NONE;
} }
self = (struct w83977af_ir *) dev->priv; self = (struct w83977af_ir *) dev->priv;
...@@ -1153,7 +1153,7 @@ static void w83977af_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -1153,7 +1153,7 @@ static void w83977af_interrupt(int irq, void *dev_id, struct pt_regs *regs)
outb(icr, iobase+ICR); /* Restore (new) interrupts */ outb(icr, iobase+ICR); /* Restore (new) interrupts */
outb(set, iobase+SSR); /* Restore bank register */ outb(set, iobase+SSR); /* Restore bank register */
return IRQ_HANDLED;
} }
/* /*
......
...@@ -73,7 +73,7 @@ struct irport_cb { ...@@ -73,7 +73,7 @@ struct irport_cb {
/* For piggyback drivers */ /* For piggyback drivers */
void *priv; void *priv;
void (*change_speed)(void *priv, __u32 speed); void (*change_speed)(void *priv, __u32 speed);
void (*interrupt)(int irq, void *dev_id, struct pt_regs *regs); int (*interrupt)(int irq, void *dev_id, struct pt_regs *regs);
}; };
struct irport_cb *irport_open(int i, unsigned int iobase, unsigned int irq); struct irport_cb *irport_open(int i, unsigned int iobase, unsigned int irq);
......
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