aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/3c509.c7
-rw-r--r--drivers/net/3c523.c7
-rw-r--r--drivers/net/3c527.c5
-rw-r--r--drivers/net/7990.c2
-rw-r--r--drivers/net/8390.c8
-rw-r--r--drivers/net/atp.c6
-rw-r--r--drivers/net/chelsio/cpl5_cmd.h6
-rw-r--r--drivers/net/de600.c6
-rw-r--r--drivers/net/declance.c4
-rw-r--r--drivers/net/dgrs.c4
-rw-r--r--drivers/net/dm9000.c2
-rw-r--r--drivers/net/eepro.c22
-rw-r--r--drivers/net/eexpress.c7
-rw-r--r--drivers/net/irda/ali-ircc.c10
-rw-r--r--drivers/net/irda/donauboe.c31
-rw-r--r--drivers/net/irda/irport.c8
-rw-r--r--drivers/net/irda/irport.h2
-rw-r--r--drivers/net/irda/nsc-ircc.c9
-rw-r--r--drivers/net/irda/w83977af_ir.c9
-rw-r--r--drivers/net/lance.c5
-rw-r--r--drivers/net/lasi_82596.c2
-rw-r--r--drivers/net/mv643xx_eth.c2
-rw-r--r--drivers/net/pcmcia/axnet_cs.c8
-rw-r--r--drivers/net/pcnet32.c7
-rw-r--r--drivers/net/plip.c5
-rw-r--r--drivers/net/s2io.h322
-rw-r--r--drivers/net/saa9730.c2
-rw-r--r--drivers/net/sb1000.c8
-rw-r--r--drivers/net/skfp/skfddi.c7
-rw-r--r--drivers/net/smc91x.c2
-rw-r--r--drivers/net/sonic.c7
-rw-r--r--drivers/net/sunhme.c4
-rw-r--r--drivers/net/sunlance.c2
-rw-r--r--drivers/net/sunqe.c2
-rw-r--r--drivers/net/tokenring/smctr.c7
-rw-r--r--drivers/net/tokenring/tms380tr.c5
-rw-r--r--drivers/net/tulip/de4x5.c6
-rw-r--r--drivers/net/wan/cycx_main.c4
-rw-r--r--drivers/net/wan/sdla.c8
-rw-r--r--drivers/net/wireless/orinoco.c2
-rw-r--r--drivers/net/wireless/wavelan_cs.c11
-rw-r--r--drivers/net/wireless/wl3501_cs.c15
-rw-r--r--drivers/net/yellowfin.c7
-rw-r--r--drivers/net/znet.c5
44 files changed, 215 insertions, 395 deletions
diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c
index 7ad0a54779c4..f791bf026e51 100644
--- a/drivers/net/3c509.c
+++ b/drivers/net/3c509.c
@@ -912,16 +912,11 @@ el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
912static irqreturn_t 912static irqreturn_t
913el3_interrupt(int irq, void *dev_id) 913el3_interrupt(int irq, void *dev_id)
914{ 914{
915 struct net_device *dev = (struct net_device *)dev_id; 915 struct net_device *dev = dev_id;
916 struct el3_private *lp; 916 struct el3_private *lp;
917 int ioaddr, status; 917 int ioaddr, status;
918 int i = max_interrupt_work; 918 int i = max_interrupt_work;
919 919
920 if (dev == NULL) {
921 printk ("el3_interrupt(): irq %d for unknown device.\n", irq);
922 return IRQ_NONE;
923 }
924
925 lp = netdev_priv(dev); 920 lp = netdev_priv(dev);
926 spin_lock(&lp->lock); 921 spin_lock(&lp->lock);
927 922
diff --git a/drivers/net/3c523.c b/drivers/net/3c523.c
index 1c97271112d0..91849469b4f4 100644
--- a/drivers/net/3c523.c
+++ b/drivers/net/3c523.c
@@ -902,14 +902,11 @@ static void *alloc_rfa(struct net_device *dev, void *ptr)
902static irqreturn_t 902static irqreturn_t
903elmc_interrupt(int irq, void *dev_id) 903elmc_interrupt(int irq, void *dev_id)
904{ 904{
905 struct net_device *dev = (struct net_device *) dev_id; 905 struct net_device *dev = dev_id;
906 unsigned short stat; 906 unsigned short stat;
907 struct priv *p; 907 struct priv *p;
908 908
909 if (dev == NULL) { 909 if (!netif_running(dev)) {
910 printk(KERN_ERR "elmc-interrupt: irq %d for unknown device.\n", irq);
911 return IRQ_NONE;
912 } else if (!netif_running(dev)) {
913 /* The 3c523 has this habit of generating interrupts during the 910 /* The 3c523 has this habit of generating interrupts during the
914 reset. I'm not sure if the ni52 has this same problem, but it's 911 reset. I'm not sure if the ni52 has this same problem, but it's
915 really annoying if we haven't finished initializing it. I was 912 really annoying if we haven't finished initializing it. I was
diff --git a/drivers/net/3c527.c b/drivers/net/3c527.c
index d516c3225ca4..f4aca5386add 100644
--- a/drivers/net/3c527.c
+++ b/drivers/net/3c527.c
@@ -1324,11 +1324,6 @@ static irqreturn_t mc32_interrupt(int irq, void *dev_id)
1324 int rx_event = 0; 1324 int rx_event = 0;
1325 int tx_event = 0; 1325 int tx_event = 0;
1326 1326
1327 if (dev == NULL) {
1328 printk(KERN_WARNING "%s: irq %d for unknown device.\n", cardname, irq);
1329 return IRQ_NONE;
1330 }
1331
1332 ioaddr = dev->base_addr; 1327 ioaddr = dev->base_addr;
1333 lp = netdev_priv(dev); 1328 lp = netdev_priv(dev);
1334 1329
diff --git a/drivers/net/7990.c b/drivers/net/7990.c
index 8e996b4a34ea..7733697f7776 100644
--- a/drivers/net/7990.c
+++ b/drivers/net/7990.c
@@ -674,7 +674,7 @@ void lance_poll(struct net_device *dev)
674 WRITERAP(lp, LE_CSR0); 674 WRITERAP(lp, LE_CSR0);
675 WRITERDP(lp, LE_C0_STRT); 675 WRITERDP(lp, LE_C0_STRT);
676 spin_unlock (&lp->devlock); 676 spin_unlock (&lp->devlock);
677 lance_interrupt(dev->irq, dev, NULL); 677 lance_interrupt(dev->irq, dev);
678} 678}
679#endif 679#endif
680 680
diff --git a/drivers/net/8390.c b/drivers/net/8390.c
index fa3442cb1a49..3d1c599ac3cb 100644
--- a/drivers/net/8390.c
+++ b/drivers/net/8390.c
@@ -406,14 +406,8 @@ irqreturn_t ei_interrupt(int irq, void *dev_id)
406 int interrupts, nr_serviced = 0; 406 int interrupts, nr_serviced = 0;
407 struct ei_device *ei_local; 407 struct ei_device *ei_local;
408 408
409 if (dev == NULL)
410 {
411 printk ("net_interrupt(): irq %d for unknown device.\n", irq);
412 return IRQ_NONE;
413 }
414
415 e8390_base = dev->base_addr; 409 e8390_base = dev->base_addr;
416 ei_local = (struct ei_device *) netdev_priv(dev); 410 ei_local = netdev_priv(dev);
417 411
418 /* 412 /*
419 * Protect the irq test too. 413 * Protect the irq test too.
diff --git a/drivers/net/atp.c b/drivers/net/atp.c
index 062f80e20874..2d306fcb7f36 100644
--- a/drivers/net/atp.c
+++ b/drivers/net/atp.c
@@ -598,17 +598,13 @@ static int atp_send_packet(struct sk_buff *skb, struct net_device *dev)
598 Handle the network interface interrupts. */ 598 Handle the network interface interrupts. */
599static irqreturn_t atp_interrupt(int irq, void *dev_instance) 599static irqreturn_t atp_interrupt(int irq, void *dev_instance)
600{ 600{
601 struct net_device *dev = (struct net_device *)dev_instance; 601 struct net_device *dev = dev_instance;
602 struct net_local *lp; 602 struct net_local *lp;
603 long ioaddr; 603 long ioaddr;
604 static int num_tx_since_rx; 604 static int num_tx_since_rx;
605 int boguscount = max_interrupt_work; 605 int boguscount = max_interrupt_work;
606 int handled = 0; 606 int handled = 0;
607 607
608 if (dev == NULL) {
609 printk(KERN_ERR "ATP_interrupt(): irq %d for unknown device.\n", irq);
610 return IRQ_NONE;
611 }
612 ioaddr = dev->base_addr; 608 ioaddr = dev->base_addr;
613 lp = netdev_priv(dev); 609 lp = netdev_priv(dev);
614 610
diff --git a/drivers/net/chelsio/cpl5_cmd.h b/drivers/net/chelsio/cpl5_cmd.h
index 27925e487bcf..5b357d9e88d6 100644
--- a/drivers/net/chelsio/cpl5_cmd.h
+++ b/drivers/net/chelsio/cpl5_cmd.h
@@ -108,7 +108,7 @@ struct cpl_tx_pkt_lso {
108 u8 iff:4; 108 u8 iff:4;
109#endif 109#endif
110 u16 vlan; 110 u16 vlan;
111 u32 len; 111 __be32 len;
112 112
113 u32 rsvd2; 113 u32 rsvd2;
114 u8 rsvd3; 114 u8 rsvd3;
@@ -119,7 +119,7 @@ struct cpl_tx_pkt_lso {
119 u8 ip_hdr_words:4; 119 u8 ip_hdr_words:4;
120 u8 tcp_hdr_words:4; 120 u8 tcp_hdr_words:4;
121#endif 121#endif
122 u16 eth_type_mss; 122 __be16 eth_type_mss;
123}; 123};
124 124
125struct cpl_rx_pkt { 125struct cpl_rx_pkt {
@@ -138,7 +138,7 @@ struct cpl_rx_pkt {
138 u8 iff:4; 138 u8 iff:4;
139#endif 139#endif
140 u16 csum; 140 u16 csum;
141 u16 vlan; 141 __be16 vlan;
142 u16 len; 142 u16 len;
143}; 143};
144 144
diff --git a/drivers/net/de600.c b/drivers/net/de600.c
index d9b006c9e367..690bb40b353d 100644
--- a/drivers/net/de600.c
+++ b/drivers/net/de600.c
@@ -265,12 +265,6 @@ static irqreturn_t de600_interrupt(int irq, void *dev_id)
265 int retrig = 0; 265 int retrig = 0;
266 int boguscount = 0; 266 int boguscount = 0;
267 267
268 /* This might just as well be deleted now, no crummy drivers present :-) */
269 if ((dev == NULL) || (DE600_IRQ != irq)) {
270 printk(KERN_ERR "%s: bogus interrupt %d\n", dev?dev->name:"DE-600", irq);
271 return IRQ_NONE;
272 }
273
274 spin_lock(&de600_lock); 268 spin_lock(&de600_lock);
275 269
276 select_nic(); 270 select_nic();
diff --git a/drivers/net/declance.c b/drivers/net/declance.c
index e179aa1c1ba0..00e2a8a134d7 100644
--- a/drivers/net/declance.c
+++ b/drivers/net/declance.c
@@ -696,7 +696,7 @@ out:
696 696
697static irqreturn_t lance_dma_merr_int(const int irq, void *dev_id) 697static irqreturn_t lance_dma_merr_int(const int irq, void *dev_id)
698{ 698{
699 struct net_device *dev = (struct net_device *) dev_id; 699 struct net_device *dev = dev_id;
700 700
701 printk("%s: DMA error\n", dev->name); 701 printk("%s: DMA error\n", dev->name);
702 return IRQ_HANDLED; 702 return IRQ_HANDLED;
@@ -704,7 +704,7 @@ static irqreturn_t lance_dma_merr_int(const int irq, void *dev_id)
704 704
705static irqreturn_t lance_interrupt(const int irq, void *dev_id) 705static irqreturn_t lance_interrupt(const int irq, void *dev_id)
706{ 706{
707 struct net_device *dev = (struct net_device *) dev_id; 707 struct net_device *dev = dev_id;
708 struct lance_private *lp = netdev_priv(dev); 708 struct lance_private *lp = netdev_priv(dev);
709 volatile struct lance_regs *ll = lp->ll; 709 volatile struct lance_regs *ll = lp->ll;
710 int csr0; 710 int csr0;
diff --git a/drivers/net/dgrs.c b/drivers/net/dgrs.c
index 6b1234b09fb3..a79520295fd0 100644
--- a/drivers/net/dgrs.c
+++ b/drivers/net/dgrs.c
@@ -897,8 +897,8 @@ static int dgrs_ioctl(struct net_device *devN, struct ifreq *ifr, int cmd)
897 897
898static irqreturn_t dgrs_intr(int irq, void *dev_id) 898static irqreturn_t dgrs_intr(int irq, void *dev_id)
899{ 899{
900 struct net_device *dev0 = (struct net_device *) dev_id; 900 struct net_device *dev0 = dev_id;
901 DGRS_PRIV *priv0 = (DGRS_PRIV *) dev0->priv; 901 DGRS_PRIV *priv0 = dev0->priv;
902 I596_CB *cbp; 902 I596_CB *cbp;
903 int cmd; 903 int cmd;
904 int i; 904 int i;
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index 3641f3b4a2cc..615d2b14efa7 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -346,7 +346,7 @@ static void dm9000_timeout(struct net_device *dev)
346static void dm9000_poll_controller(struct net_device *dev) 346static void dm9000_poll_controller(struct net_device *dev)
347{ 347{
348 disable_irq(dev->irq); 348 disable_irq(dev->irq);
349 dm9000_interrupt(dev->irq,dev,NULL); 349 dm9000_interrupt(dev->irq,dev);
350 enable_irq(dev->irq); 350 enable_irq(dev->irq);
351} 351}
352#endif 352#endif
diff --git a/drivers/net/eepro.c b/drivers/net/eepro.c
index aae454aaa1c6..a4eb0dc99ecf 100644
--- a/drivers/net/eepro.c
+++ b/drivers/net/eepro.c
@@ -994,16 +994,6 @@ static int eepro_open(struct net_device *dev)
994 return -EAGAIN; 994 return -EAGAIN;
995 } 995 }
996 996
997#ifdef irq2dev_map
998 if (((irq2dev_map[dev->irq] != 0)
999 || (irq2dev_map[dev->irq] = dev) == 0) &&
1000 (irq2dev_map[dev->irq]!=dev)) {
1001 /* printk("%s: IRQ map wrong\n", dev->name); */
1002 free_irq(dev->irq, dev);
1003 return -EAGAIN;
1004 }
1005#endif
1006
1007 /* Initialize the 82595. */ 997 /* Initialize the 82595. */
1008 998
1009 eepro_sw2bank2(ioaddr); /* be CAREFUL, BANK 2 now */ 999 eepro_sw2bank2(ioaddr); /* be CAREFUL, BANK 2 now */
@@ -1198,17 +1188,11 @@ static int eepro_send_packet(struct sk_buff *skb, struct net_device *dev)
1198static irqreturn_t 1188static irqreturn_t
1199eepro_interrupt(int irq, void *dev_id) 1189eepro_interrupt(int irq, void *dev_id)
1200{ 1190{
1201 struct net_device *dev = (struct net_device *)dev_id; 1191 struct net_device *dev = dev_id;
1202 /* (struct net_device *)(irq2dev_map[irq]);*/
1203 struct eepro_local *lp; 1192 struct eepro_local *lp;
1204 int ioaddr, status, boguscount = 20; 1193 int ioaddr, status, boguscount = 20;
1205 int handled = 0; 1194 int handled = 0;
1206 1195
1207 if (dev == NULL) {
1208 printk (KERN_ERR "eepro_interrupt(): irq %d for unknown device.\\n", irq);
1209 return IRQ_NONE;
1210 }
1211
1212 lp = netdev_priv(dev); 1196 lp = netdev_priv(dev);
1213 1197
1214 spin_lock(&lp->lock); 1198 spin_lock(&lp->lock);
@@ -1288,10 +1272,6 @@ static int eepro_close(struct net_device *dev)
1288 /* release the interrupt */ 1272 /* release the interrupt */
1289 free_irq(dev->irq, dev); 1273 free_irq(dev->irq, dev);
1290 1274
1291#ifdef irq2dev_map
1292 irq2dev_map[dev->irq] = 0;
1293#endif
1294
1295 /* Update the statistics here. What statistics? */ 1275 /* Update the statistics here. What statistics? */
1296 1276
1297 return 0; 1277 return 0;
diff --git a/drivers/net/eexpress.c b/drivers/net/eexpress.c
index 05ca730fe81e..e14be020e562 100644
--- a/drivers/net/eexpress.c
+++ b/drivers/net/eexpress.c
@@ -796,13 +796,6 @@ static irqreturn_t eexp_irq(int irq, void *dev_info)
796 unsigned short ioaddr,status,ack_cmd; 796 unsigned short ioaddr,status,ack_cmd;
797 unsigned short old_read_ptr, old_write_ptr; 797 unsigned short old_read_ptr, old_write_ptr;
798 798
799 if (dev==NULL)
800 {
801 printk(KERN_WARNING "eexpress: irq %d for unknown device\n",
802 irq);
803 return IRQ_NONE;
804 }
805
806 lp = netdev_priv(dev); 799 lp = netdev_priv(dev);
807 ioaddr = dev->base_addr; 800 ioaddr = dev->base_addr;
808 801
diff --git a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c
index 971e2dee1e6b..cebf8c374bc5 100644
--- a/drivers/net/irda/ali-ircc.c
+++ b/drivers/net/irda/ali-ircc.c
@@ -662,19 +662,13 @@ static int ali_ircc_read_dongle_id (int i, chipio_t *info)
662 */ 662 */
663static irqreturn_t ali_ircc_interrupt(int irq, void *dev_id) 663static irqreturn_t ali_ircc_interrupt(int irq, void *dev_id)
664{ 664{
665 struct net_device *dev = (struct net_device *) dev_id; 665 struct net_device *dev = dev_id;
666 struct ali_ircc_cb *self; 666 struct ali_ircc_cb *self;
667 int ret; 667 int ret;
668 668
669 IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__); 669 IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__);
670 670
671 if (!dev) { 671 self = dev->priv;
672 IRDA_WARNING("%s: irq %d for unknown device.\n",
673 ALI_IRCC_DRIVER_NAME, irq);
674 return IRQ_NONE;
675 }
676
677 self = (struct ali_ircc_cb *) dev->priv;
678 672
679 spin_lock(&self->lock); 673 spin_lock(&self->lock);
680 674
diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c
index 7a9128181e68..16620bd97fbf 100644
--- a/drivers/net/irda/donauboe.c
+++ b/drivers/net/irda/donauboe.c
@@ -657,12 +657,6 @@ toshoboe_makemttpacket (struct toshoboe_cb *self, void *buf, int mtt)
657 return xbofs; 657 return xbofs;
658} 658}
659 659
660static int toshoboe_invalid_dev(int irq)
661{
662 printk (KERN_WARNING DRIVER_NAME ": irq %d for unknown device.\n", irq);
663 return 1;
664}
665
666#ifdef USE_PROBE 660#ifdef USE_PROBE
667/***********************************************************************/ 661/***********************************************************************/
668/* Probe code */ 662/* Probe code */
@@ -711,12 +705,9 @@ stuff_byte (__u8 byte, __u8 * buf)
711static irqreturn_t 705static irqreturn_t
712toshoboe_probeinterrupt (int irq, void *dev_id) 706toshoboe_probeinterrupt (int irq, void *dev_id)
713{ 707{
714 struct toshoboe_cb *self = (struct toshoboe_cb *) dev_id; 708 struct toshoboe_cb *self = dev_id;
715 __u8 irqstat; 709 __u8 irqstat;
716 710
717 if (self == NULL && toshoboe_invalid_dev(irq))
718 return IRQ_NONE;
719
720 irqstat = INB (OBOE_ISR); 711 irqstat = INB (OBOE_ISR);
721 712
722/* was it us */ 713/* was it us */
@@ -1163,13 +1154,10 @@ dumpbufs(skb->data,skb->len,'>');
1163static irqreturn_t 1154static irqreturn_t
1164toshoboe_interrupt (int irq, void *dev_id) 1155toshoboe_interrupt (int irq, void *dev_id)
1165{ 1156{
1166 struct toshoboe_cb *self = (struct toshoboe_cb *) dev_id; 1157 struct toshoboe_cb *self = dev_id;
1167 __u8 irqstat; 1158 __u8 irqstat;
1168 struct sk_buff *skb = NULL; 1159 struct sk_buff *skb = NULL;
1169 1160
1170 if (self == NULL && toshoboe_invalid_dev(irq))
1171 return IRQ_NONE;
1172
1173 irqstat = INB (OBOE_ISR); 1161 irqstat = INB (OBOE_ISR);
1174 1162
1175/* was it us */ 1163/* was it us */
@@ -1357,13 +1345,11 @@ toshoboe_net_open (struct net_device *dev)
1357{ 1345{
1358 struct toshoboe_cb *self; 1346 struct toshoboe_cb *self;
1359 unsigned long flags; 1347 unsigned long flags;
1348 int rc;
1360 1349
1361 IRDA_DEBUG (4, "%s()\n", __FUNCTION__); 1350 IRDA_DEBUG (4, "%s()\n", __FUNCTION__);
1362 1351
1363 IRDA_ASSERT (dev != NULL, return -1; ); 1352 self = netdev_priv(dev);
1364 self = (struct toshoboe_cb *) dev->priv;
1365
1366 IRDA_ASSERT (self != NULL, return 0; );
1367 1353
1368 if (self->async) 1354 if (self->async)
1369 return -EBUSY; 1355 return -EBUSY;
@@ -1371,11 +1357,10 @@ toshoboe_net_open (struct net_device *dev)
1371 if (self->stopped) 1357 if (self->stopped)
1372 return 0; 1358 return 0;
1373 1359
1374 if (request_irq (self->io.irq, toshoboe_interrupt, 1360 rc = request_irq (self->io.irq, toshoboe_interrupt,
1375 IRQF_SHARED | IRQF_DISABLED, dev->name, (void *) self)) 1361 IRQF_SHARED | IRQF_DISABLED, dev->name, self);
1376 { 1362 if (rc)
1377 return -EAGAIN; 1363 return rc;
1378 }
1379 1364
1380 spin_lock_irqsave(&self->spinlock, flags); 1365 spin_lock_irqsave(&self->spinlock, flags);
1381 toshoboe_startchip (self); 1366 toshoboe_startchip (self);
diff --git a/drivers/net/irda/irport.c b/drivers/net/irda/irport.c
index 6ea78ececca7..654a68b490ae 100644
--- a/drivers/net/irda/irport.c
+++ b/drivers/net/irda/irport.c
@@ -766,18 +766,14 @@ static inline void irport_receive(struct irport_cb *self)
766 */ 766 */
767static irqreturn_t irport_interrupt(int irq, void *dev_id) 767static irqreturn_t irport_interrupt(int irq, void *dev_id)
768{ 768{
769 struct net_device *dev = (struct net_device *) dev_id; 769 struct net_device *dev = dev_id;
770 struct irport_cb *self; 770 struct irport_cb *self;
771 int boguscount = 0; 771 int boguscount = 0;
772 int iobase; 772 int iobase;
773 int iir, lsr; 773 int iir, lsr;
774 int handled = 0; 774 int handled = 0;
775 775
776 if (!dev) { 776 self = dev->priv;
777 IRDA_WARNING("%s() irq %d for unknown device.\n", __FUNCTION__, irq);
778 return IRQ_NONE;
779 }
780 self = (struct irport_cb *) dev->priv;
781 777
782 spin_lock(&self->lock); 778 spin_lock(&self->lock);
783 779
diff --git a/drivers/net/irda/irport.h b/drivers/net/irda/irport.h
index 4393168347e3..3f46b84c6c85 100644
--- a/drivers/net/irda/irport.h
+++ b/drivers/net/irda/irport.h
@@ -74,7 +74,7 @@ struct irport_cb {
74 /* For piggyback drivers */ 74 /* For piggyback drivers */
75 void *priv; 75 void *priv;
76 void (*change_speed)(void *priv, __u32 speed); 76 void (*change_speed)(void *priv, __u32 speed);
77 int (*interrupt)(int irq, void *dev_id); 77 irqreturn_t (*interrupt)(int irq, void *dev_id);
78}; 78};
79 79
80#endif /* IRPORT_H */ 80#endif /* IRPORT_H */
diff --git a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c
index ea12e999814a..29b5ccd29d0b 100644
--- a/drivers/net/irda/nsc-ircc.c
+++ b/drivers/net/irda/nsc-ircc.c
@@ -2068,17 +2068,12 @@ static void nsc_ircc_fir_interrupt(struct nsc_ircc_cb *self, int iobase,
2068 */ 2068 */
2069static irqreturn_t nsc_ircc_interrupt(int irq, void *dev_id) 2069static irqreturn_t nsc_ircc_interrupt(int irq, void *dev_id)
2070{ 2070{
2071 struct net_device *dev = (struct net_device *) dev_id; 2071 struct net_device *dev = dev_id;
2072 struct nsc_ircc_cb *self; 2072 struct nsc_ircc_cb *self;
2073 __u8 bsr, eir; 2073 __u8 bsr, eir;
2074 int iobase; 2074 int iobase;
2075 2075
2076 if (!dev) { 2076 self = dev->priv;
2077 IRDA_WARNING("%s: irq %d for unknown device.\n",
2078 driver_name, irq);
2079 return IRQ_NONE;
2080 }
2081 self = (struct nsc_ircc_cb *) dev->priv;
2082 2077
2083 spin_lock(&self->lock); 2078 spin_lock(&self->lock);
2084 2079
diff --git a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c
index b4fb92a7baa8..4212657fa4f9 100644
--- a/drivers/net/irda/w83977af_ir.c
+++ b/drivers/net/irda/w83977af_ir.c
@@ -1113,17 +1113,12 @@ static __u8 w83977af_fir_interrupt(struct w83977af_ir *self, int isr)
1113 */ 1113 */
1114static irqreturn_t w83977af_interrupt(int irq, void *dev_id) 1114static irqreturn_t w83977af_interrupt(int irq, void *dev_id)
1115{ 1115{
1116 struct net_device *dev = (struct net_device *) dev_id; 1116 struct net_device *dev = dev_id;
1117 struct w83977af_ir *self; 1117 struct w83977af_ir *self;
1118 __u8 set, icr, isr; 1118 __u8 set, icr, isr;
1119 int iobase; 1119 int iobase;
1120 1120
1121 if (!dev) { 1121 self = dev->priv;
1122 printk(KERN_WARNING "%s: irq %d for unknown device.\n",
1123 driver_name, irq);
1124 return IRQ_NONE;
1125 }
1126 self = (struct w83977af_ir *) dev->priv;
1127 1122
1128 iobase = self->io.fir_base; 1123 iobase = self->io.fir_base;
1129 1124
diff --git a/drivers/net/lance.c b/drivers/net/lance.c
index 7afac47e59ad..6efbd499d752 100644
--- a/drivers/net/lance.c
+++ b/drivers/net/lance.c
@@ -1019,11 +1019,6 @@ static irqreturn_t lance_interrupt(int irq, void *dev_id)
1019 int csr0, ioaddr, boguscnt=10; 1019 int csr0, ioaddr, boguscnt=10;
1020 int must_restart; 1020 int must_restart;
1021 1021
1022 if (dev == NULL) {
1023 printk ("lance_interrupt(): irq %d for unknown device.\n", irq);
1024 return IRQ_NONE;
1025 }
1026
1027 ioaddr = dev->base_addr; 1022 ioaddr = dev->base_addr;
1028 lp = dev->priv; 1023 lp = dev->priv;
1029 1024
diff --git a/drivers/net/lasi_82596.c b/drivers/net/lasi_82596.c
index 8cbd940f0ac2..f4d815bca643 100644
--- a/drivers/net/lasi_82596.c
+++ b/drivers/net/lasi_82596.c
@@ -1252,7 +1252,7 @@ static int __devinit i82596_probe(struct net_device *dev,
1252static void i596_poll_controller(struct net_device *dev) 1252static void i596_poll_controller(struct net_device *dev)
1253{ 1253{
1254 disable_irq(dev->irq); 1254 disable_irq(dev->irq);
1255 i596_interrupt(dev->irq, dev, NULL); 1255 i596_interrupt(dev->irq, dev);
1256 enable_irq(dev->irq); 1256 enable_irq(dev->irq);
1257} 1257}
1258#endif 1258#endif
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index d26a819a9735..2ffa3a59e704 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -1251,7 +1251,7 @@ static void mv643xx_netpoll(struct net_device *netdev)
1251 /* wait for previous write to complete */ 1251 /* wait for previous write to complete */
1252 mv_read(MV643XX_ETH_INTERRUPT_MASK_REG(port_num)); 1252 mv_read(MV643XX_ETH_INTERRUPT_MASK_REG(port_num));
1253 1253
1254 mv643xx_eth_int_handler(netdev->irq, netdev, NULL); 1254 mv643xx_eth_int_handler(netdev->irq, netdev);
1255 1255
1256 mv_write(MV643XX_ETH_INTERRUPT_MASK_REG(port_num), ETH_INT_UNMASK_ALL); 1256 mv_write(MV643XX_ETH_INTERRUPT_MASK_REG(port_num), ETH_INT_UNMASK_ALL);
1257} 1257}
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index e5f366910914..5ddd5742f779 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -1201,14 +1201,8 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id)
1201 struct ei_device *ei_local; 1201 struct ei_device *ei_local;
1202 int handled = 0; 1202 int handled = 0;
1203 1203
1204 if (dev == NULL)
1205 {
1206 printk ("net_interrupt(): irq %d for unknown device.\n", irq);
1207 return IRQ_NONE;
1208 }
1209
1210 e8390_base = dev->base_addr; 1204 e8390_base = dev->base_addr;
1211 ei_local = (struct ei_device *) netdev_priv(dev); 1205 ei_local = netdev_priv(dev);
1212 1206
1213 /* 1207 /*
1214 * Protect the irq test too. 1208 * Protect the irq test too.
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
index c73e2f210774..36f9d988278f 100644
--- a/drivers/net/pcnet32.c
+++ b/drivers/net/pcnet32.c
@@ -2569,13 +2569,6 @@ pcnet32_interrupt(int irq, void *dev_id)
2569 u16 csr0; 2569 u16 csr0;
2570 int boguscnt = max_interrupt_work; 2570 int boguscnt = max_interrupt_work;
2571 2571
2572 if (!dev) {
2573 if (pcnet32_debug & NETIF_MSG_INTR)
2574 printk(KERN_DEBUG "%s(): irq %d for unknown device\n",
2575 __FUNCTION__, irq);
2576 return IRQ_NONE;
2577 }
2578
2579 ioaddr = dev->base_addr; 2572 ioaddr = dev->base_addr;
2580 lp = dev->priv; 2573 lp = dev->priv;
2581 2574
diff --git a/drivers/net/plip.c b/drivers/net/plip.c
index c0b333d2917a..71afb274498f 100644
--- a/drivers/net/plip.c
+++ b/drivers/net/plip.c
@@ -909,11 +909,6 @@ plip_interrupt(int irq, void *dev_id)
909 struct plip_local *rcv; 909 struct plip_local *rcv;
910 unsigned char c0; 910 unsigned char c0;
911 911
912 if (dev == NULL) {
913 printk(KERN_DEBUG "plip_interrupt: irq %d for unknown device.\n", irq);
914 return;
915 }
916
917 nl = netdev_priv(dev); 912 nl = netdev_priv(dev);
918 rcv = &nl->rcv_data; 913 rcv = &nl->rcv_data;
919 914
diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h
index 72f52dc98f53..12b719f4d00f 100644
--- a/drivers/net/s2io.h
+++ b/drivers/net/s2io.h
@@ -116,179 +116,179 @@ typedef struct {
116/* The statistics block of Xena */ 116/* The statistics block of Xena */
117typedef struct stat_block { 117typedef struct stat_block {
118/* Tx MAC statistics counters. */ 118/* Tx MAC statistics counters. */
119 u32 tmac_data_octets; 119 __le32 tmac_data_octets;
120 u32 tmac_frms; 120 __le32 tmac_frms;
121 u64 tmac_drop_frms; 121 __le64 tmac_drop_frms;
122 u32 tmac_bcst_frms; 122 __le32 tmac_bcst_frms;
123 u32 tmac_mcst_frms; 123 __le32 tmac_mcst_frms;
124 u64 tmac_pause_ctrl_frms; 124 __le64 tmac_pause_ctrl_frms;
125 u32 tmac_ucst_frms; 125 __le32 tmac_ucst_frms;
126 u32 tmac_ttl_octets; 126 __le32 tmac_ttl_octets;
127 u32 tmac_any_err_frms; 127 __le32 tmac_any_err_frms;
128 u32 tmac_nucst_frms; 128 __le32 tmac_nucst_frms;
129 u64 tmac_ttl_less_fb_octets; 129 __le64 tmac_ttl_less_fb_octets;
130 u64 tmac_vld_ip_octets; 130 __le64 tmac_vld_ip_octets;
131 u32 tmac_drop_ip; 131 __le32 tmac_drop_ip;
132 u32 tmac_vld_ip; 132 __le32 tmac_vld_ip;
133 u32 tmac_rst_tcp; 133 __le32 tmac_rst_tcp;
134 u32 tmac_icmp; 134 __le32 tmac_icmp;
135 u64 tmac_tcp; 135 __le64 tmac_tcp;
136 u32 reserved_0; 136 __le32 reserved_0;
137 u32 tmac_udp; 137 __le32 tmac_udp;
138 138
139/* Rx MAC Statistics counters. */ 139/* Rx MAC Statistics counters. */
140 u32 rmac_data_octets; 140 __le32 rmac_data_octets;
141 u32 rmac_vld_frms; 141 __le32 rmac_vld_frms;
142 u64 rmac_fcs_err_frms; 142 __le64 rmac_fcs_err_frms;
143 u64 rmac_drop_frms; 143 __le64 rmac_drop_frms;
144 u32 rmac_vld_bcst_frms; 144 __le32 rmac_vld_bcst_frms;
145 u32 rmac_vld_mcst_frms; 145 __le32 rmac_vld_mcst_frms;
146 u32 rmac_out_rng_len_err_frms; 146 __le32 rmac_out_rng_len_err_frms;
147 u32 rmac_in_rng_len_err_frms; 147 __le32 rmac_in_rng_len_err_frms;
148 u64 rmac_long_frms; 148 __le64 rmac_long_frms;
149 u64 rmac_pause_ctrl_frms; 149 __le64 rmac_pause_ctrl_frms;
150 u64 rmac_unsup_ctrl_frms; 150 __le64 rmac_unsup_ctrl_frms;
151 u32 rmac_accepted_ucst_frms; 151 __le32 rmac_accepted_ucst_frms;
152 u32 rmac_ttl_octets; 152 __le32 rmac_ttl_octets;
153 u32 rmac_discarded_frms; 153 __le32 rmac_discarded_frms;
154 u32 rmac_accepted_nucst_frms; 154 __le32 rmac_accepted_nucst_frms;
155 u32 reserved_1; 155 __le32 reserved_1;
156 u32 rmac_drop_events; 156 __le32 rmac_drop_events;
157 u64 rmac_ttl_less_fb_octets; 157 __le64 rmac_ttl_less_fb_octets;
158 u64 rmac_ttl_frms; 158 __le64 rmac_ttl_frms;
159 u64 reserved_2; 159 __le64 reserved_2;
160 u32 rmac_usized_frms; 160 __le32 rmac_usized_frms;
161 u32 reserved_3; 161 __le32 reserved_3;
162 u32 rmac_frag_frms; 162 __le32 rmac_frag_frms;
163 u32 rmac_osized_frms; 163 __le32 rmac_osized_frms;
164 u32 reserved_4; 164 __le32 reserved_4;
165 u32 rmac_jabber_frms; 165 __le32 rmac_jabber_frms;
166 u64 rmac_ttl_64_frms; 166 __le64 rmac_ttl_64_frms;
167 u64 rmac_ttl_65_127_frms; 167 __le64 rmac_ttl_65_127_frms;
168 u64 reserved_5; 168 __le64 reserved_5;
169 u64 rmac_ttl_128_255_frms; 169 __le64 rmac_ttl_128_255_frms;
170 u64 rmac_ttl_256_511_frms; 170 __le64 rmac_ttl_256_511_frms;
171 u64 reserved_6; 171 __le64 reserved_6;
172 u64 rmac_ttl_512_1023_frms; 172 __le64 rmac_ttl_512_1023_frms;
173 u64 rmac_ttl_1024_1518_frms; 173 __le64 rmac_ttl_1024_1518_frms;
174 u32 rmac_ip; 174 __le32 rmac_ip;
175 u32 reserved_7; 175 __le32 reserved_7;
176 u64 rmac_ip_octets; 176 __le64 rmac_ip_octets;
177 u32 rmac_drop_ip; 177 __le32 rmac_drop_ip;
178 u32 rmac_hdr_err_ip; 178 __le32 rmac_hdr_err_ip;
179 u32 reserved_8; 179 __le32 reserved_8;
180 u32 rmac_icmp; 180 __le32 rmac_icmp;
181 u64 rmac_tcp; 181 __le64 rmac_tcp;
182 u32 rmac_err_drp_udp; 182 __le32 rmac_err_drp_udp;
183 u32 rmac_udp; 183 __le32 rmac_udp;
184 u64 rmac_xgmii_err_sym; 184 __le64 rmac_xgmii_err_sym;
185 u64 rmac_frms_q0; 185 __le64 rmac_frms_q0;
186 u64 rmac_frms_q1; 186 __le64 rmac_frms_q1;
187 u64 rmac_frms_q2; 187 __le64 rmac_frms_q2;
188 u64 rmac_frms_q3; 188 __le64 rmac_frms_q3;
189 u64 rmac_frms_q4; 189 __le64 rmac_frms_q4;
190 u64 rmac_frms_q5; 190 __le64 rmac_frms_q5;
191 u64 rmac_frms_q6; 191 __le64 rmac_frms_q6;
192 u64 rmac_frms_q7; 192 __le64 rmac_frms_q7;
193 u16 rmac_full_q3; 193 __le16 rmac_full_q3;
194 u16 rmac_full_q2; 194 __le16 rmac_full_q2;
195 u16 rmac_full_q1; 195 __le16 rmac_full_q1;
196 u16 rmac_full_q0; 196 __le16 rmac_full_q0;
197 u16 rmac_full_q7; 197 __le16 rmac_full_q7;
198 u16 rmac_full_q6; 198 __le16 rmac_full_q6;
199 u16 rmac_full_q5; 199 __le16 rmac_full_q5;
200 u16 rmac_full_q4; 200 __le16 rmac_full_q4;
201 u32 reserved_9; 201 __le32 reserved_9;
202 u32 rmac_pause_cnt; 202 __le32 rmac_pause_cnt;
203 u64 rmac_xgmii_data_err_cnt; 203 __le64 rmac_xgmii_data_err_cnt;
204 u64 rmac_xgmii_ctrl_err_cnt; 204 __le64 rmac_xgmii_ctrl_err_cnt;
205 u32 rmac_err_tcp; 205 __le32 rmac_err_tcp;
206 u32 rmac_accepted_ip; 206 __le32 rmac_accepted_ip;
207 207
208/* PCI/PCI-X Read transaction statistics. */ 208/* PCI/PCI-X Read transaction statistics. */
209 u32 new_rd_req_cnt; 209 __le32 new_rd_req_cnt;
210 u32 rd_req_cnt; 210 __le32 rd_req_cnt;
211 u32 rd_rtry_cnt; 211 __le32 rd_rtry_cnt;
212 u32 new_rd_req_rtry_cnt; 212 __le32 new_rd_req_rtry_cnt;
213 213
214/* PCI/PCI-X Write/Read transaction statistics. */ 214/* PCI/PCI-X Write/Read transaction statistics. */
215 u32 wr_req_cnt; 215 __le32 wr_req_cnt;
216 u32 wr_rtry_rd_ack_cnt; 216 __le32 wr_rtry_rd_ack_cnt;
217 u32 new_wr_req_rtry_cnt; 217 __le32 new_wr_req_rtry_cnt;
218 u32 new_wr_req_cnt; 218 __le32 new_wr_req_cnt;
219 u32 wr_disc_cnt; 219 __le32 wr_disc_cnt;
220 u32 wr_rtry_cnt; 220 __le32 wr_rtry_cnt;
221 221
222/* PCI/PCI-X Write / DMA Transaction statistics. */ 222/* PCI/PCI-X Write / DMA Transaction statistics. */
223 u32 txp_wr_cnt; 223 __le32 txp_wr_cnt;
224 u32 rd_rtry_wr_ack_cnt; 224 __le32 rd_rtry_wr_ack_cnt;
225 u32 txd_wr_cnt; 225 __le32 txd_wr_cnt;
226 u32 txd_rd_cnt; 226 __le32 txd_rd_cnt;
227 u32 rxd_wr_cnt; 227 __le32 rxd_wr_cnt;
228 u32 rxd_rd_cnt; 228 __le32 rxd_rd_cnt;
229 u32 rxf_wr_cnt; 229 __le32 rxf_wr_cnt;
230 u32 txf_rd_cnt; 230 __le32 txf_rd_cnt;
231 231
232/* Tx MAC statistics overflow counters. */ 232/* Tx MAC statistics overflow counters. */
233 u32 tmac_data_octets_oflow; 233 __le32 tmac_data_octets_oflow;
234 u32 tmac_frms_oflow; 234 __le32 tmac_frms_oflow;
235 u32 tmac_bcst_frms_oflow; 235 __le32 tmac_bcst_frms_oflow;
236 u32 tmac_mcst_frms_oflow; 236 __le32 tmac_mcst_frms_oflow;
237 u32 tmac_ucst_frms_oflow; 237 __le32 tmac_ucst_frms_oflow;
238 u32 tmac_ttl_octets_oflow; 238 __le32 tmac_ttl_octets_oflow;
239 u32 tmac_any_err_frms_oflow; 239 __le32 tmac_any_err_frms_oflow;
240 u32 tmac_nucst_frms_oflow; 240 __le32 tmac_nucst_frms_oflow;
241 u64 tmac_vlan_frms; 241 __le64 tmac_vlan_frms;
242 u32 tmac_drop_ip_oflow; 242 __le32 tmac_drop_ip_oflow;
243 u32 tmac_vld_ip_oflow; 243 __le32 tmac_vld_ip_oflow;
244 u32 tmac_rst_tcp_oflow; 244 __le32 tmac_rst_tcp_oflow;
245 u32 tmac_icmp_oflow; 245 __le32 tmac_icmp_oflow;
246 u32 tpa_unknown_protocol; 246 __le32 tpa_unknown_protocol;
247 u32 tmac_udp_oflow; 247 __le32 tmac_udp_oflow;
248 u32 reserved_10; 248 __le32 reserved_10;
249 u32 tpa_parse_failure; 249 __le32 tpa_parse_failure;
250 250
251/* Rx MAC Statistics overflow counters. */ 251/* Rx MAC Statistics overflow counters. */
252 u32 rmac_data_octets_oflow; 252 __le32 rmac_data_octets_oflow;
253 u32 rmac_vld_frms_oflow; 253 __le32 rmac_vld_frms_oflow;
254 u32 rmac_vld_bcst_frms_oflow; 254 __le32 rmac_vld_bcst_frms_oflow;
255 u32 rmac_vld_mcst_frms_oflow; 255 __le32 rmac_vld_mcst_frms_oflow;
256 u32 rmac_accepted_ucst_frms_oflow; 256 __le32 rmac_accepted_ucst_frms_oflow;
257 u32 rmac_ttl_octets_oflow; 257 __le32 rmac_ttl_octets_oflow;
258 u32 rmac_discarded_frms_oflow; 258 __le32 rmac_discarded_frms_oflow;
259 u32 rmac_accepted_nucst_frms_oflow; 259 __le32 rmac_accepted_nucst_frms_oflow;
260 u32 rmac_usized_frms_oflow; 260 __le32 rmac_usized_frms_oflow;
261 u32 rmac_drop_events_oflow; 261 __le32 rmac_drop_events_oflow;
262 u32 rmac_frag_frms_oflow; 262 __le32 rmac_frag_frms_oflow;
263 u32 rmac_osized_frms_oflow; 263 __le32 rmac_osized_frms_oflow;
264 u32 rmac_ip_oflow; 264 __le32 rmac_ip_oflow;
265 u32 rmac_jabber_frms_oflow; 265 __le32 rmac_jabber_frms_oflow;
266 u32 rmac_icmp_oflow; 266 __le32 rmac_icmp_oflow;
267 u32 rmac_drop_ip_oflow; 267 __le32 rmac_drop_ip_oflow;
268 u32 rmac_err_drp_udp_oflow; 268 __le32 rmac_err_drp_udp_oflow;
269 u32 rmac_udp_oflow; 269 __le32 rmac_udp_oflow;
270 u32 reserved_11; 270 __le32 reserved_11;
271 u32 rmac_pause_cnt_oflow; 271 __le32 rmac_pause_cnt_oflow;
272 u64 rmac_ttl_1519_4095_frms; 272 __le64 rmac_ttl_1519_4095_frms;
273 u64 rmac_ttl_4096_8191_frms; 273 __le64 rmac_ttl_4096_8191_frms;
274 u64 rmac_ttl_8192_max_frms; 274 __le64 rmac_ttl_8192_max_frms;
275 u64 rmac_ttl_gt_max_frms; 275 __le64 rmac_ttl_gt_max_frms;
276 u64 rmac_osized_alt_frms; 276 __le64 rmac_osized_alt_frms;
277 u64 rmac_jabber_alt_frms; 277 __le64 rmac_jabber_alt_frms;
278 u64 rmac_gt_max_alt_frms; 278 __le64 rmac_gt_max_alt_frms;
279 u64 rmac_vlan_frms; 279 __le64 rmac_vlan_frms;
280 u32 rmac_len_discard; 280 __le32 rmac_len_discard;
281 u32 rmac_fcs_discard; 281 __le32 rmac_fcs_discard;
282 u32 rmac_pf_discard; 282 __le32 rmac_pf_discard;
283 u32 rmac_da_discard; 283 __le32 rmac_da_discard;
284 u32 rmac_red_discard; 284 __le32 rmac_red_discard;
285 u32 rmac_rts_discard; 285 __le32 rmac_rts_discard;
286 u32 reserved_12; 286 __le32 reserved_12;
287 u32 rmac_ingm_full_discard; 287 __le32 rmac_ingm_full_discard;
288 u32 reserved_13; 288 __le32 reserved_13;
289 u32 rmac_accepted_ip_oflow; 289 __le32 rmac_accepted_ip_oflow;
290 u32 reserved_14; 290 __le32 reserved_14;
291 u32 link_fault_cnt; 291 __le32 link_fault_cnt;
292 u8 buffer[20]; 292 u8 buffer[20];
293 swStat_t sw_stat; 293 swStat_t sw_stat;
294 xpakStat_t xpak_stat; 294 xpakStat_t xpak_stat;
diff --git a/drivers/net/saa9730.c b/drivers/net/saa9730.c
index c9efad8a917e..b269513cde45 100644
--- a/drivers/net/saa9730.c
+++ b/drivers/net/saa9730.c
@@ -747,7 +747,7 @@ static int lan_saa9730_rx(struct net_device *dev)
747 747
748static irqreturn_t lan_saa9730_interrupt(const int irq, void *dev_id) 748static irqreturn_t lan_saa9730_interrupt(const int irq, void *dev_id)
749{ 749{
750 struct net_device *dev = (struct net_device *) dev_id; 750 struct net_device *dev = dev_id;
751 struct lan_saa9730_private *lp = netdev_priv(dev); 751 struct lan_saa9730_private *lp = netdev_priv(dev);
752 752
753 if (lan_saa9730_debug > 5) 753 if (lan_saa9730_debug > 5)
diff --git a/drivers/net/sb1000.c b/drivers/net/sb1000.c
index dc30dee5537f..b9fa4fbb1398 100644
--- a/drivers/net/sb1000.c
+++ b/drivers/net/sb1000.c
@@ -1084,19 +1084,13 @@ static irqreturn_t sb1000_interrupt(int irq, void *dev_id)
1084 char *name; 1084 char *name;
1085 unsigned char st; 1085 unsigned char st;
1086 int ioaddr[2]; 1086 int ioaddr[2];
1087 struct net_device *dev = (struct net_device *) dev_id; 1087 struct net_device *dev = dev_id;
1088 struct sb1000_private *lp = netdev_priv(dev); 1088 struct sb1000_private *lp = netdev_priv(dev);
1089 1089
1090 const unsigned char Command0[6] = {0x80, 0x2c, 0x00, 0x00, 0x00, 0x00}; 1090 const unsigned char Command0[6] = {0x80, 0x2c, 0x00, 0x00, 0x00, 0x00};
1091 const unsigned char Command1[6] = {0x80, 0x2e, 0x00, 0x00, 0x00, 0x00}; 1091 const unsigned char Command1[6] = {0x80, 0x2e, 0x00, 0x00, 0x00, 0x00};
1092 const int MaxRxErrorCount = 6; 1092 const int MaxRxErrorCount = 6;
1093 1093
1094 if (dev == NULL) {
1095 printk(KERN_ERR "sb1000_interrupt(): irq %d for unknown device.\n",
1096 irq);
1097 return IRQ_NONE;
1098 }
1099
1100 ioaddr[0] = dev->base_addr; 1094 ioaddr[0] = dev->base_addr;
1101 /* mem_start holds the second I/O address */ 1095 /* mem_start holds the second I/O address */
1102 ioaddr[1] = dev->mem_start; 1096 ioaddr[1] = dev->mem_start;
diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c
index 06ea2626c6f4..9733a11c6146 100644
--- a/drivers/net/skfp/skfddi.c
+++ b/drivers/net/skfp/skfddi.c
@@ -616,15 +616,10 @@ static int skfp_close(struct net_device *dev)
616 616
617irqreturn_t skfp_interrupt(int irq, void *dev_id) 617irqreturn_t skfp_interrupt(int irq, void *dev_id)
618{ 618{
619 struct net_device *dev = (struct net_device *) dev_id; 619 struct net_device *dev = dev_id;
620 struct s_smc *smc; /* private board structure pointer */ 620 struct s_smc *smc; /* private board structure pointer */
621 skfddi_priv *bp; 621 skfddi_priv *bp;
622 622
623 if (dev == NULL) {
624 printk("%s: irq %d for unknown device\n", dev->name, irq);
625 return IRQ_NONE;
626 }
627
628 smc = netdev_priv(dev); 623 smc = netdev_priv(dev);
629 bp = &smc->os; 624 bp = &smc->os;
630 625
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index 506807fa5268..95b6478f55c6 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -1400,7 +1400,7 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id)
1400static void smc_poll_controller(struct net_device *dev) 1400static void smc_poll_controller(struct net_device *dev)
1401{ 1401{
1402 disable_irq(dev->irq); 1402 disable_irq(dev->irq);
1403 smc_interrupt(dev->irq, dev, NULL); 1403 smc_interrupt(dev->irq, dev);
1404 enable_irq(dev->irq); 1404 enable_irq(dev->irq);
1405} 1405}
1406#endif 1406#endif
diff --git a/drivers/net/sonic.c b/drivers/net/sonic.c
index cfece9676aff..ed7aa0a5acca 100644
--- a/drivers/net/sonic.c
+++ b/drivers/net/sonic.c
@@ -295,15 +295,10 @@ static int sonic_send_packet(struct sk_buff *skb, struct net_device *dev)
295 */ 295 */
296static irqreturn_t sonic_interrupt(int irq, void *dev_id) 296static irqreturn_t sonic_interrupt(int irq, void *dev_id)
297{ 297{
298 struct net_device *dev = (struct net_device *) dev_id; 298 struct net_device *dev = dev_id;
299 struct sonic_local *lp = netdev_priv(dev); 299 struct sonic_local *lp = netdev_priv(dev);
300 int status; 300 int status;
301 301
302 if (dev == NULL) {
303 printk(KERN_ERR "sonic_interrupt: irq %d for unknown device.\n", irq);
304 return IRQ_NONE;
305 }
306
307 if (!(status = SONIC_READ(SONIC_ISR) & SONIC_IMR_DEFAULT)) 302 if (!(status = SONIC_READ(SONIC_ISR) & SONIC_IMR_DEFAULT))
308 return IRQ_NONE; 303 return IRQ_NONE;
309 304
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c
index 45d07faf7b96..9d7cd130c19d 100644
--- a/drivers/net/sunhme.c
+++ b/drivers/net/sunhme.c
@@ -2095,8 +2095,8 @@ static void happy_meal_rx(struct happy_meal *hp, struct net_device *dev)
2095 2095
2096static irqreturn_t happy_meal_interrupt(int irq, void *dev_id) 2096static irqreturn_t happy_meal_interrupt(int irq, void *dev_id)
2097{ 2097{
2098 struct net_device *dev = (struct net_device *) dev_id; 2098 struct net_device *dev = dev_id;
2099 struct happy_meal *hp = dev->priv; 2099 struct happy_meal *hp = netdev_priv(dev);
2100 u32 happy_status = hme_read32(hp, hp->gregs + GREG_STAT); 2100 u32 happy_status = hme_read32(hp, hp->gregs + GREG_STAT);
2101 2101
2102 HMD(("happy_meal_interrupt: status=%08x ", happy_status)); 2102 HMD(("happy_meal_interrupt: status=%08x ", happy_status));
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c
index 9207e19cac34..5b00d79b5573 100644
--- a/drivers/net/sunlance.c
+++ b/drivers/net/sunlance.c
@@ -822,7 +822,7 @@ out:
822 822
823static irqreturn_t lance_interrupt(int irq, void *dev_id) 823static irqreturn_t lance_interrupt(int irq, void *dev_id)
824{ 824{
825 struct net_device *dev = (struct net_device *)dev_id; 825 struct net_device *dev = dev_id;
826 struct lance_private *lp = netdev_priv(dev); 826 struct lance_private *lp = netdev_priv(dev);
827 int csr0; 827 int csr0;
828 828
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c
index 020e78170595..7874eb1ef043 100644
--- a/drivers/net/sunqe.c
+++ b/drivers/net/sunqe.c
@@ -468,7 +468,7 @@ static void qe_tx_reclaim(struct sunqe *qep);
468 */ 468 */
469static irqreturn_t qec_interrupt(int irq, void *dev_id) 469static irqreturn_t qec_interrupt(int irq, void *dev_id)
470{ 470{
471 struct sunqec *qecp = (struct sunqec *) dev_id; 471 struct sunqec *qecp = dev_id;
472 u32 qec_status; 472 u32 qec_status;
473 int channel = 0; 473 int channel = 0;
474 474
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c
index 9bd4cba87872..46dabdb12071 100644
--- a/drivers/net/tokenring/smctr.c
+++ b/drivers/net/tokenring/smctr.c
@@ -1990,15 +1990,8 @@ static irqreturn_t smctr_interrupt(int irq, void *dev_id)
1990 __u8 isb_type, isb_subtype; 1990 __u8 isb_type, isb_subtype;
1991 __u16 isb_index; 1991 __u16 isb_index;
1992 1992
1993 if(dev == NULL)
1994 {
1995 printk(KERN_CRIT "%s: irq %d for unknown device.\n", dev->name, irq);
1996 return IRQ_NONE;
1997 }
1998
1999 ioaddr = dev->base_addr; 1993 ioaddr = dev->base_addr;
2000 tp = netdev_priv(dev); 1994 tp = netdev_priv(dev);
2001
2002 1995
2003 if(tp->status == NOT_INITIALIZED) 1996 if(tp->status == NOT_INITIALIZED)
2004 return IRQ_NONE; 1997 return IRQ_NONE;
diff --git a/drivers/net/tokenring/tms380tr.c b/drivers/net/tokenring/tms380tr.c
index c0ab6e44eb1f..ea797ca2b988 100644
--- a/drivers/net/tokenring/tms380tr.c
+++ b/drivers/net/tokenring/tms380tr.c
@@ -751,11 +751,6 @@ irqreturn_t tms380tr_interrupt(int irq, void *dev_id)
751 unsigned short irq_type; 751 unsigned short irq_type;
752 int handled = 0; 752 int handled = 0;
753 753
754 if(dev == NULL) {
755 printk(KERN_INFO "%s: irq %d for unknown device.\n", dev->name, irq);
756 return IRQ_NONE;
757 }
758
759 tp = netdev_priv(dev); 754 tp = netdev_priv(dev);
760 755
761 irq_type = SIFREADW(SIFSTS); 756 irq_type = SIFREADW(SIFSTS);
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c
index e17f9779ead2..3f4b6408b755 100644
--- a/drivers/net/tulip/de4x5.c
+++ b/drivers/net/tulip/de4x5.c
@@ -1540,16 +1540,12 @@ de4x5_queue_pkt(struct sk_buff *skb, struct net_device *dev)
1540static irqreturn_t 1540static irqreturn_t
1541de4x5_interrupt(int irq, void *dev_id) 1541de4x5_interrupt(int irq, void *dev_id)
1542{ 1542{
1543 struct net_device *dev = (struct net_device *)dev_id; 1543 struct net_device *dev = dev_id;
1544 struct de4x5_private *lp; 1544 struct de4x5_private *lp;
1545 s32 imr, omr, sts, limit; 1545 s32 imr, omr, sts, limit;
1546 u_long iobase; 1546 u_long iobase;
1547 unsigned int handled = 0; 1547 unsigned int handled = 0;
1548 1548
1549 if (dev == NULL) {
1550 printk ("de4x5_interrupt(): irq %d for unknown device.\n", irq);
1551 return IRQ_NONE;
1552 }
1553 lp = netdev_priv(dev); 1549 lp = netdev_priv(dev);
1554 spin_lock(&lp->lock); 1550 spin_lock(&lp->lock);
1555 iobase = dev->base_addr; 1551 iobase = dev->base_addr;
diff --git a/drivers/net/wan/cycx_main.c b/drivers/net/wan/cycx_main.c
index 12363e056b63..6e5f1c898517 100644
--- a/drivers/net/wan/cycx_main.c
+++ b/drivers/net/wan/cycx_main.c
@@ -303,9 +303,9 @@ out: return ret;
303 */ 303 */
304static irqreturn_t cycx_isr(int irq, void *dev_id) 304static irqreturn_t cycx_isr(int irq, void *dev_id)
305{ 305{
306 struct cycx_device *card = (struct cycx_device *)dev_id; 306 struct cycx_device *card = dev_id;
307 307
308 if (!card || card->wandev.state == WAN_UNCONFIGURED) 308 if (card->wandev.state == WAN_UNCONFIGURED)
309 goto out; 309 goto out;
310 310
311 if (card->in_isr) { 311 if (card->in_isr) {
diff --git a/drivers/net/wan/sdla.c b/drivers/net/wan/sdla.c
index 5715d25271f1..6a485f0556f4 100644
--- a/drivers/net/wan/sdla.c
+++ b/drivers/net/wan/sdla.c
@@ -875,13 +875,7 @@ static irqreturn_t sdla_isr(int irq, void *dev_id)
875 875
876 dev = dev_id; 876 dev = dev_id;
877 877
878 if (dev == NULL) 878 flp = netdev_priv(dev);
879 {
880 printk(KERN_WARNING "sdla_isr(): irq %d for unknown device.\n", irq);
881 return IRQ_NONE;
882 }
883
884 flp = dev->priv;
885 879
886 if (!flp->initialized) 880 if (!flp->initialized)
887 { 881 {
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c
index 793da5f69344..b779c7dcc1a8 100644
--- a/drivers/net/wireless/orinoco.c
+++ b/drivers/net/wireless/orinoco.c
@@ -1954,7 +1954,7 @@ static void __orinoco_ev_wterr(struct net_device *dev, hermes_t *hw)
1954 1954
1955irqreturn_t orinoco_interrupt(int irq, void *dev_id) 1955irqreturn_t orinoco_interrupt(int irq, void *dev_id)
1956{ 1956{
1957 struct net_device *dev = (struct net_device *)dev_id; 1957 struct net_device *dev = dev_id;
1958 struct orinoco_private *priv = netdev_priv(dev); 1958 struct orinoco_private *priv = netdev_priv(dev);
1959 hermes_t *hw = &priv->hw; 1959 hermes_t *hw = &priv->hw;
1960 int count = MAX_IRQLOOPS_PER_IRQ; 1960 int count = MAX_IRQLOOPS_PER_IRQ;
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c
index cadfe132db84..aafb301041b1 100644
--- a/drivers/net/wireless/wavelan_cs.c
+++ b/drivers/net/wireless/wavelan_cs.c
@@ -4119,21 +4119,12 @@ static irqreturn_t
4119wavelan_interrupt(int irq, 4119wavelan_interrupt(int irq,
4120 void * dev_id) 4120 void * dev_id)
4121{ 4121{
4122 struct net_device * dev; 4122 struct net_device * dev = dev_id;
4123 net_local * lp; 4123 net_local * lp;
4124 kio_addr_t base; 4124 kio_addr_t base;
4125 int status0; 4125 int status0;
4126 u_int tx_status; 4126 u_int tx_status;
4127 4127
4128 if ((dev = dev_id) == NULL)
4129 {
4130#ifdef DEBUG_INTERRUPT_ERROR
4131 printk(KERN_WARNING "wavelan_interrupt(): irq %d for unknown device.\n",
4132 irq);
4133#endif
4134 return IRQ_NONE;
4135 }
4136
4137#ifdef DEBUG_INTERRUPT_TRACE 4128#ifdef DEBUG_INTERRUPT_TRACE
4138 printk(KERN_DEBUG "%s: ->wavelan_interrupt()\n", dev->name); 4129 printk(KERN_DEBUG "%s: ->wavelan_interrupt()\n", dev->name);
4139#endif 4130#endif
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index a1430352169b..5b98a7876982 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -1155,25 +1155,18 @@ static inline void wl3501_ack_interrupt(struct wl3501_card *this)
1155 */ 1155 */
1156static irqreturn_t wl3501_interrupt(int irq, void *dev_id) 1156static irqreturn_t wl3501_interrupt(int irq, void *dev_id)
1157{ 1157{
1158 struct net_device *dev = (struct net_device *)dev_id; 1158 struct net_device *dev = dev_id;
1159 struct wl3501_card *this; 1159 struct wl3501_card *this;
1160 int handled = 1;
1161 1160
1162 if (!dev) 1161 this = netdev_priv(dev);
1163 goto unknown;
1164 this = dev->priv;
1165 spin_lock(&this->lock); 1162 spin_lock(&this->lock);
1166 wl3501_ack_interrupt(this); 1163 wl3501_ack_interrupt(this);
1167 wl3501_block_interrupt(this); 1164 wl3501_block_interrupt(this);
1168 wl3501_rx_interrupt(dev); 1165 wl3501_rx_interrupt(dev);
1169 wl3501_unblock_interrupt(this); 1166 wl3501_unblock_interrupt(this);
1170 spin_unlock(&this->lock); 1167 spin_unlock(&this->lock);
1171out: 1168
1172 return IRQ_RETVAL(handled); 1169 return IRQ_HANDLED;
1173unknown:
1174 handled = 0;
1175 printk(KERN_ERR "%s: irq %d for unknown device.\n", __FUNCTION__, irq);
1176 goto out;
1177} 1170}
1178 1171
1179static int wl3501_reset_board(struct wl3501_card *this) 1172static int wl3501_reset_board(struct wl3501_card *this)
diff --git a/drivers/net/yellowfin.c b/drivers/net/yellowfin.c
index ac600212d9a9..2412ce4917f2 100644
--- a/drivers/net/yellowfin.c
+++ b/drivers/net/yellowfin.c
@@ -896,13 +896,6 @@ static irqreturn_t yellowfin_interrupt(int irq, void *dev_instance)
896 int boguscnt = max_interrupt_work; 896 int boguscnt = max_interrupt_work;
897 unsigned int handled = 0; 897 unsigned int handled = 0;
898 898
899#ifndef final_version /* Can never occur. */
900 if (dev == NULL) {
901 printk (KERN_ERR "yellowfin_interrupt(): irq %d for unknown device.\n", irq);
902 return IRQ_NONE;
903 }
904#endif
905
906 yp = netdev_priv(dev); 899 yp = netdev_priv(dev);
907 ioaddr = yp->base; 900 ioaddr = yp->base;
908 901
diff --git a/drivers/net/znet.c b/drivers/net/znet.c
index 2068a109a86c..b24b0727108c 100644
--- a/drivers/net/znet.c
+++ b/drivers/net/znet.c
@@ -610,11 +610,6 @@ static irqreturn_t znet_interrupt(int irq, void *dev_id)
610 int boguscnt = 20; 610 int boguscnt = 20;
611 int handled = 0; 611 int handled = 0;
612 612
613 if (dev == NULL) {
614 printk(KERN_WARNING "znet_interrupt(): IRQ %d for unknown device.\n", irq);
615 return IRQ_NONE;
616 }
617
618 spin_lock (&znet->lock); 613 spin_lock (&znet->lock);
619 614
620 ioaddr = dev->base_addr; 615 ioaddr = dev->base_addr;