Commit 9f2e4827 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds

[PATCH] M68k IRQ API updates [17/20]

M68k net drivers: Update to the new irq API (from Roman Zippel and me) [17/20]
parent fdab239f
...@@ -501,7 +501,7 @@ static void i596_display_data(struct net_device *dev) ...@@ -501,7 +501,7 @@ static void i596_display_data(struct net_device *dev)
#if defined(ENABLE_MVME16x_NET) || defined(ENABLE_BVME6000_NET) #if defined(ENABLE_MVME16x_NET) || defined(ENABLE_BVME6000_NET)
static void i596_error(int irq, void *dev_id, struct pt_regs *regs) static irqreturn_t i596_error(int irq, void *dev_id, struct pt_regs *regs)
{ {
struct net_device *dev = dev_id; struct net_device *dev = dev_id;
#ifdef ENABLE_MVME16x_NET #ifdef ENABLE_MVME16x_NET
...@@ -522,6 +522,7 @@ static void i596_error(int irq, void *dev_id, struct pt_regs *regs) ...@@ -522,6 +522,7 @@ static void i596_error(int irq, void *dev_id, struct pt_regs *regs)
#endif #endif
printk(KERN_ERR "%s: Error interrupt\n", dev->name); printk(KERN_ERR "%s: Error interrupt\n", dev->name);
i596_display_data(dev); i596_display_data(dev);
return IRQ_HANDLED;
} }
#endif #endif
...@@ -1004,13 +1005,13 @@ static int i596_open(struct net_device *dev) ...@@ -1004,13 +1005,13 @@ static int i596_open(struct net_device *dev)
DEB(DEB_OPEN,printk(KERN_DEBUG "%s: i596_open() irq %d.\n", dev->name, dev->irq)); DEB(DEB_OPEN,printk(KERN_DEBUG "%s: i596_open() irq %d.\n", dev->name, dev->irq));
if (request_irq(dev->irq, &i596_interrupt, 0, "i82596", dev)) { if (request_irq(dev->irq, i596_interrupt, 0, "i82596", dev)) {
printk(KERN_ERR "%s: IRQ %d not free\n", dev->name, dev->irq); printk(KERN_ERR "%s: IRQ %d not free\n", dev->name, dev->irq);
return -EAGAIN; return -EAGAIN;
} }
#ifdef ENABLE_MVME16x_NET #ifdef ENABLE_MVME16x_NET
if (MACH_IS_MVME16x) { if (MACH_IS_MVME16x) {
if (request_irq(0x56, &i596_error, 0, "i82596_error", dev)) if (request_irq(0x56, i596_error, 0, "i82596_error", dev))
return -EAGAIN; return -EAGAIN;
} }
#endif #endif
......
...@@ -85,7 +85,7 @@ static void apne_block_input(struct net_device *dev, int count, ...@@ -85,7 +85,7 @@ static void apne_block_input(struct net_device *dev, int count,
struct sk_buff *skb, int ring_offset); struct sk_buff *skb, int ring_offset);
static void apne_block_output(struct net_device *dev, const int count, static void apne_block_output(struct net_device *dev, const int count,
const unsigned char *buf, const int start_page); const unsigned char *buf, const int start_page);
static void apne_interrupt(int irq, void *dev_id, struct pt_regs *regs); static irqreturn_t apne_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static int init_pcmcia(void); static int init_pcmcia(void);
...@@ -511,18 +511,18 @@ apne_block_output(struct net_device *dev, int count, ...@@ -511,18 +511,18 @@ apne_block_output(struct net_device *dev, int count,
return; return;
} }
static void apne_interrupt(int irq, void *dev_id, struct pt_regs *regs) static irqreturn_t apne_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{ {
unsigned char pcmcia_intreq; unsigned char pcmcia_intreq;
if (!(gayle.inten & GAYLE_IRQ_IRQ)) if (!(gayle.inten & GAYLE_IRQ_IRQ))
return; return IRQ_NONE;
pcmcia_intreq = pcmcia_get_intreq(); pcmcia_intreq = pcmcia_get_intreq();
if (!(pcmcia_intreq & GAYLE_IRQ_IRQ)) { if (!(pcmcia_intreq & GAYLE_IRQ_IRQ)) {
pcmcia_ack_int(pcmcia_intreq); pcmcia_ack_int(pcmcia_intreq);
return; return IRQ_NONE;
} }
if (ei_debug > 3) if (ei_debug > 3)
printk("pcmcia intreq = %x\n", pcmcia_intreq); printk("pcmcia intreq = %x\n", pcmcia_intreq);
...@@ -530,6 +530,7 @@ static void apne_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -530,6 +530,7 @@ static void apne_interrupt(int irq, void *dev_id, struct pt_regs *regs)
ei_interrupt(irq, dev_id, regs); ei_interrupt(irq, dev_id, regs);
pcmcia_ack_int(pcmcia_get_intreq()); pcmcia_ack_int(pcmcia_get_intreq());
pcmcia_enable_irq(); pcmcia_enable_irq();
return IRQ_HANDLED;
} }
#ifdef MODULE #ifdef MODULE
......
...@@ -221,9 +221,9 @@ get_status(unsigned char *adr) { ...@@ -221,9 +221,9 @@ get_status(unsigned char *adr) {
return c; return c;
} }
static void static irqreturn_t
bionet_intr(int irq, void *data, struct pt_regs *fp) { bionet_intr(int irq, void *data, struct pt_regs *fp) {
return; return IRQ_HANDLED;
} }
......
...@@ -167,7 +167,7 @@ static int pamsnet_close(struct net_device *dev); ...@@ -167,7 +167,7 @@ static int pamsnet_close(struct net_device *dev);
static struct net_device_stats *net_get_stats(struct net_device *dev); static struct net_device_stats *net_get_stats(struct net_device *dev);
static void pamsnet_tick(unsigned long); static void pamsnet_tick(unsigned long);
static void pamsnet_intr(int irq, void *data, struct pt_regs *fp); static irqreturn_t pamsnet_intr(int irq, void *data, struct pt_regs *fp);
static struct timer_list pamsnet_timer = TIMER_INITIALIZER(amsnet_tick, 0, 0); static struct timer_list pamsnet_timer = TIMER_INITIALIZER(amsnet_tick, 0, 0);
...@@ -494,13 +494,13 @@ static HADDR ...@@ -494,13 +494,13 @@ static HADDR
return (ret); return (ret);
} }
static void static irqreturn_t
pamsnet_intr(irq, data, fp) pamsnet_intr(irq, data, fp)
int irq; int irq;
void *data; void *data;
struct pt_regs *fp; struct pt_regs *fp;
{ {
return; return IRQ_HANDLED;
} }
/* receivepkt() loads a packet to a given buffer and returns its length */ /* receivepkt() loads a packet to a given buffer and returns its length */
......
...@@ -77,8 +77,8 @@ static int mace_xmit_start(struct sk_buff *skb, struct net_device *dev); ...@@ -77,8 +77,8 @@ static int mace_xmit_start(struct sk_buff *skb, struct net_device *dev);
static struct net_device_stats *mace_stats(struct net_device *dev); static struct net_device_stats *mace_stats(struct net_device *dev);
static void mace_set_multicast(struct net_device *dev); static void mace_set_multicast(struct net_device *dev);
static int mace_set_address(struct net_device *dev, void *addr); static int mace_set_address(struct net_device *dev, void *addr);
static void mace_interrupt(int irq, void *dev_id, struct pt_regs *regs); static irqreturn_t mace_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static void mace_dma_intr(int irq, void *dev_id, struct pt_regs *regs); static irqreturn_t mace_dma_intr(int irq, void *dev_id, struct pt_regs *regs);
static void mace_tx_timeout(struct net_device *dev); static void mace_tx_timeout(struct net_device *dev);
/* Bit-reverse one byte of an ethernet hardware address. */ /* Bit-reverse one byte of an ethernet hardware address. */
...@@ -561,7 +561,7 @@ static void mace_recv_interrupt(struct net_device *dev) ...@@ -561,7 +561,7 @@ static void mace_recv_interrupt(struct net_device *dev)
* Process the chip interrupt * Process the chip interrupt
*/ */
static void mace_interrupt(int irq, void *dev_id, struct pt_regs *regs) static irqreturn_t mace_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 mace_data *mp = (struct mace_data *) dev->priv; struct mace_data *mp = (struct mace_data *) dev->priv;
...@@ -577,6 +577,7 @@ static void mace_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -577,6 +577,7 @@ static void mace_interrupt(int irq, void *dev_id, struct pt_regs *regs)
if (ir & RCVINT) { if (ir & RCVINT) {
mace_recv_interrupt(dev); mace_recv_interrupt(dev);
} }
return IRQ_HANDLED;
} }
static void mace_tx_timeout(struct net_device *dev) static void mace_tx_timeout(struct net_device *dev)
...@@ -632,7 +633,7 @@ static void mace_dma_rx_frame(struct net_device *dev, struct mace_frame *mf) ...@@ -632,7 +633,7 @@ static void mace_dma_rx_frame(struct net_device *dev, struct mace_frame *mf)
* The PSC has passed us a DMA interrupt event. * The PSC has passed us a DMA interrupt event.
*/ */
static void mace_dma_intr(int irq, void *dev_id, struct pt_regs *regs) static irqreturn_t mace_dma_intr(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 mace_data *mp = (struct mace_data *) dev->priv; struct mace_data *mp = (struct mace_data *) dev->priv;
...@@ -643,7 +644,7 @@ static void mace_dma_intr(int irq, void *dev_id, struct pt_regs *regs) ...@@ -643,7 +644,7 @@ static void mace_dma_intr(int irq, void *dev_id, struct pt_regs *regs)
/* Not sure what this does */ /* Not sure what this does */
while ((baka = psc_read_long(PSC_MYSTERY)) != psc_read_long(PSC_MYSTERY)); while ((baka = psc_read_long(PSC_MYSTERY)) != psc_read_long(PSC_MYSTERY));
if (!(baka & 0x60000000)) return; if (!(baka & 0x60000000)) return IRQ_NONE;
/* /*
* Process the read queue * Process the read queue
...@@ -691,6 +692,7 @@ static void mace_dma_intr(int irq, void *dev_id, struct pt_regs *regs) ...@@ -691,6 +692,7 @@ static void mace_dma_intr(int irq, void *dev_id, struct pt_regs *regs)
mp->tx_count++; mp->tx_count++;
netif_wake_queue(dev); netif_wake_queue(dev);
} }
return IRQ_HANDLED;
} }
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -238,7 +238,7 @@ static int lance_probe( struct net_device *dev); ...@@ -238,7 +238,7 @@ static int lance_probe( struct net_device *dev);
static int lance_open( struct net_device *dev ); static int lance_open( struct net_device *dev );
static void lance_init_ring( struct net_device *dev ); static void lance_init_ring( struct net_device *dev );
static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ); static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev );
static void lance_interrupt( int irq, void *dev_id, struct pt_regs *fp ); static irqreturn_t lance_interrupt( int irq, void *dev_id, struct pt_regs *fp );
static int lance_rx( struct net_device *dev ); static int lance_rx( struct net_device *dev );
static int lance_close( struct net_device *dev ); static int lance_close( struct net_device *dev );
static struct net_device_stats *lance_get_stats( struct net_device *dev ); static struct net_device_stats *lance_get_stats( struct net_device *dev );
...@@ -620,7 +620,7 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ) ...@@ -620,7 +620,7 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev )
/* The LANCE interrupt handler. */ /* The LANCE interrupt handler. */
static void lance_interrupt( int irq, void *dev_id, struct pt_regs *fp) static irqreturn_t lance_interrupt( int irq, void *dev_id, struct pt_regs *fp)
{ {
struct net_device *dev = dev_id; struct net_device *dev = dev_id;
struct lance_private *lp = dev->priv; struct lance_private *lp = dev->priv;
...@@ -629,7 +629,7 @@ static void lance_interrupt( int irq, void *dev_id, struct pt_regs *fp) ...@@ -629,7 +629,7 @@ static void lance_interrupt( int irq, void *dev_id, struct pt_regs *fp)
if (dev == NULL) { if (dev == NULL) {
DPRINTK( 1, ( "lance_interrupt(): invalid dev_id\n" )); DPRINTK( 1, ( "lance_interrupt(): invalid dev_id\n" ));
return; return IRQ_NONE;
} }
if (in_interrupt) if (in_interrupt)
...@@ -688,7 +688,7 @@ static void lance_interrupt( int irq, void *dev_id, struct pt_regs *fp) ...@@ -688,7 +688,7 @@ static void lance_interrupt( int irq, void *dev_id, struct pt_regs *fp)
REGA(CSR3) = CSR3_BSWP; REGA(CSR3) = CSR3_BSWP;
lance_init_ring(dev); lance_init_ring(dev);
REGA(CSR0) = CSR0_STRT | CSR0_INEA; REGA(CSR0) = CSR0_STRT | CSR0_INEA;
return; return IRQ_HANDLED;
} }
} else if(head->flag & (TMD1_ENP | TMD1_STP)) { } else if(head->flag & (TMD1_ENP | TMD1_STP)) {
...@@ -743,7 +743,7 @@ static void lance_interrupt( int irq, void *dev_id, struct pt_regs *fp) ...@@ -743,7 +743,7 @@ static void lance_interrupt( int irq, void *dev_id, struct pt_regs *fp)
DPRINTK( 2, ( "%s: exiting interrupt, csr0=%#04x.\n", DPRINTK( 2, ( "%s: exiting interrupt, csr0=%#04x.\n",
dev->name, DREG )); dev->name, DREG ));
in_interrupt = 0; in_interrupt = 0;
return; return IRQ_HANDLED;
} }
/* get packet, toss into skbuff */ /* get packet, toss into skbuff */
......
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