aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/3c509.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/3c509.c')
-rw-r--r--drivers/net/3c509.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c
index e6c545fe5f58..b9d097c9f6bb 100644
--- a/drivers/net/3c509.c
+++ b/drivers/net/3c509.c
@@ -413,7 +413,7 @@ static int __devinit el3_pnp_probe(struct pnp_dev *pdev,
413{ 413{
414 short i; 414 short i;
415 int ioaddr, irq, if_port; 415 int ioaddr, irq, if_port;
416 u16 phys_addr[3]; 416 __be16 phys_addr[3];
417 struct net_device *dev = NULL; 417 struct net_device *dev = NULL;
418 int err; 418 int err;
419 419
@@ -605,7 +605,7 @@ static int __init el3_mca_probe(struct device *device)
605 605
606 short i; 606 short i;
607 int ioaddr, irq, if_port; 607 int ioaddr, irq, if_port;
608 u16 phys_addr[3]; 608 __be16 phys_addr[3];
609 struct net_device *dev = NULL; 609 struct net_device *dev = NULL;
610 u_char pos4, pos5; 610 u_char pos4, pos5;
611 struct mca_device *mdev = to_mca_device(device); 611 struct mca_device *mdev = to_mca_device(device);
@@ -635,14 +635,13 @@ static int __init el3_mca_probe(struct device *device)
635 printk(KERN_DEBUG "3c529: irq %d ioaddr 0x%x ifport %d\n", irq, ioaddr, if_port); 635 printk(KERN_DEBUG "3c529: irq %d ioaddr 0x%x ifport %d\n", irq, ioaddr, if_port);
636 } 636 }
637 EL3WINDOW(0); 637 EL3WINDOW(0);
638 for (i = 0; i < 3; i++) { 638 for (i = 0; i < 3; i++)
639 phys_addr[i] = htons(read_eeprom(ioaddr, i)); 639 phys_addr[i] = htons(read_eeprom(ioaddr, i));
640 }
641 640
642 dev = alloc_etherdev(sizeof (struct el3_private)); 641 dev = alloc_etherdev(sizeof (struct el3_private));
643 if (dev == NULL) { 642 if (dev == NULL) {
644 release_region(ioaddr, EL3_IO_EXTENT); 643 release_region(ioaddr, EL3_IO_EXTENT);
645 return -ENOMEM; 644 return -ENOMEM;
646 } 645 }
647 646
648 netdev_boot_setup_check(dev); 647 netdev_boot_setup_check(dev);
@@ -668,7 +667,7 @@ static int __init el3_eisa_probe (struct device *device)
668{ 667{
669 short i; 668 short i;
670 int ioaddr, irq, if_port; 669 int ioaddr, irq, if_port;
671 u16 phys_addr[3]; 670 __be16 phys_addr[3];
672 struct net_device *dev = NULL; 671 struct net_device *dev = NULL;
673 struct eisa_device *edev; 672 struct eisa_device *edev;
674 int err; 673 int err;
@@ -1063,7 +1062,6 @@ el3_rx(struct net_device *dev)
1063 struct sk_buff *skb; 1062 struct sk_buff *skb;
1064 1063
1065 skb = dev_alloc_skb(pkt_len+5); 1064 skb = dev_alloc_skb(pkt_len+5);
1066 dev->stats.rx_bytes += pkt_len;
1067 if (el3_debug > 4) 1065 if (el3_debug > 4)
1068 printk("Receiving packet size %d status %4.4x.\n", 1066 printk("Receiving packet size %d status %4.4x.\n",
1069 pkt_len, rx_status); 1067 pkt_len, rx_status);
@@ -1078,6 +1076,7 @@ el3_rx(struct net_device *dev)
1078 skb->protocol = eth_type_trans(skb,dev); 1076 skb->protocol = eth_type_trans(skb,dev);
1079 netif_rx(skb); 1077 netif_rx(skb);
1080 dev->last_rx = jiffies; 1078 dev->last_rx = jiffies;
1079 dev->stats.rx_bytes += pkt_len;
1081 dev->stats.rx_packets++; 1080 dev->stats.rx_packets++;
1082 continue; 1081 continue;
1083 } 1082 }