diff options
Diffstat (limited to 'drivers/net/pcmcia')
-rw-r--r-- | drivers/net/pcmcia/3c574_cs.c | 6 | ||||
-rw-r--r-- | drivers/net/pcmcia/3c589_cs.c | 6 | ||||
-rw-r--r-- | drivers/net/pcmcia/axnet_cs.c | 22 | ||||
-rw-r--r-- | drivers/net/pcmcia/com20020_cs.c | 6 | ||||
-rw-r--r-- | drivers/net/pcmcia/fmvj18x_cs.c | 79 | ||||
-rw-r--r-- | drivers/net/pcmcia/nmclan_cs.c | 6 | ||||
-rw-r--r-- | drivers/net/pcmcia/pcnet_cs.c | 3 | ||||
-rw-r--r-- | drivers/net/pcmcia/smc91c92_cs.c | 5 | ||||
-rw-r--r-- | drivers/net/pcmcia/xirc2ps_cs.c | 6 |
9 files changed, 80 insertions, 59 deletions
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c index 08c4dd896077..e5cb6b1f0ebd 100644 --- a/drivers/net/pcmcia/3c574_cs.c +++ b/drivers/net/pcmcia/3c574_cs.c | |||
@@ -345,7 +345,6 @@ static int tc574_config(struct pcmcia_device *link) | |||
345 | __be16 *phys_addr; | 345 | __be16 *phys_addr; |
346 | char *cardname; | 346 | char *cardname; |
347 | __u32 config; | 347 | __u32 config; |
348 | DECLARE_MAC_BUF(mac); | ||
349 | 348 | ||
350 | phys_addr = (__be16 *)dev->dev_addr; | 349 | phys_addr = (__be16 *)dev->dev_addr; |
351 | 350 | ||
@@ -463,9 +462,9 @@ static int tc574_config(struct pcmcia_device *link) | |||
463 | strcpy(lp->node.dev_name, dev->name); | 462 | strcpy(lp->node.dev_name, dev->name); |
464 | 463 | ||
465 | printk(KERN_INFO "%s: %s at io %#3lx, irq %d, " | 464 | printk(KERN_INFO "%s: %s at io %#3lx, irq %d, " |
466 | "hw_addr %s.\n", | 465 | "hw_addr %pM.\n", |
467 | dev->name, cardname, dev->base_addr, dev->irq, | 466 | dev->name, cardname, dev->base_addr, dev->irq, |
468 | print_mac(mac, dev->dev_addr)); | 467 | dev->dev_addr); |
469 | printk(" %dK FIFO split %s Rx:Tx, %sMII interface.\n", | 468 | printk(" %dK FIFO split %s Rx:Tx, %sMII interface.\n", |
470 | 8 << config & Ram_size, | 469 | 8 << config & Ram_size, |
471 | ram_split[(config & Ram_split) >> Ram_split_shift], | 470 | ram_split[(config & Ram_split) >> Ram_split_shift], |
@@ -1062,7 +1061,6 @@ static int el3_rx(struct net_device *dev, int worklimit) | |||
1062 | ((pkt_len+3)>>2)); | 1061 | ((pkt_len+3)>>2)); |
1063 | skb->protocol = eth_type_trans(skb, dev); | 1062 | skb->protocol = eth_type_trans(skb, dev); |
1064 | netif_rx(skb); | 1063 | netif_rx(skb); |
1065 | dev->last_rx = jiffies; | ||
1066 | dev->stats.rx_packets++; | 1064 | dev->stats.rx_packets++; |
1067 | dev->stats.rx_bytes += pkt_len; | 1065 | dev->stats.rx_bytes += pkt_len; |
1068 | } else { | 1066 | } else { |
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c index c235cdba69c6..73ecc657999d 100644 --- a/drivers/net/pcmcia/3c589_cs.c +++ b/drivers/net/pcmcia/3c589_cs.c | |||
@@ -255,7 +255,6 @@ static int tc589_config(struct pcmcia_device *link) | |||
255 | int last_fn, last_ret, i, j, multi = 0, fifo; | 255 | int last_fn, last_ret, i, j, multi = 0, fifo; |
256 | unsigned int ioaddr; | 256 | unsigned int ioaddr; |
257 | char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"}; | 257 | char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"}; |
258 | DECLARE_MAC_BUF(mac); | ||
259 | 258 | ||
260 | DEBUG(0, "3c589_config(0x%p)\n", link); | 259 | DEBUG(0, "3c589_config(0x%p)\n", link); |
261 | 260 | ||
@@ -333,9 +332,9 @@ static int tc589_config(struct pcmcia_device *link) | |||
333 | strcpy(lp->node.dev_name, dev->name); | 332 | strcpy(lp->node.dev_name, dev->name); |
334 | 333 | ||
335 | printk(KERN_INFO "%s: 3Com 3c%s, io %#3lx, irq %d, " | 334 | printk(KERN_INFO "%s: 3Com 3c%s, io %#3lx, irq %d, " |
336 | "hw_addr %s\n", | 335 | "hw_addr %pM\n", |
337 | dev->name, (multi ? "562" : "589"), dev->base_addr, dev->irq, | 336 | dev->name, (multi ? "562" : "589"), dev->base_addr, dev->irq, |
338 | print_mac(mac, dev->dev_addr)); | 337 | dev->dev_addr); |
339 | printk(KERN_INFO " %dK FIFO split %s Rx:Tx, %s xcvr\n", | 338 | printk(KERN_INFO " %dK FIFO split %s Rx:Tx, %s xcvr\n", |
340 | (fifo & 7) ? 32 : 8, ram_split[(fifo >> 16) & 3], | 339 | (fifo & 7) ? 32 : 8, ram_split[(fifo >> 16) & 3], |
341 | if_names[dev->if_port]); | 340 | if_names[dev->if_port]); |
@@ -884,7 +883,6 @@ static int el3_rx(struct net_device *dev) | |||
884 | (pkt_len+3)>>2); | 883 | (pkt_len+3)>>2); |
885 | skb->protocol = eth_type_trans(skb, dev); | 884 | skb->protocol = eth_type_trans(skb, dev); |
886 | netif_rx(skb); | 885 | netif_rx(skb); |
887 | dev->last_rx = jiffies; | ||
888 | dev->stats.rx_packets++; | 886 | dev->stats.rx_packets++; |
889 | dev->stats.rx_bytes += pkt_len; | 887 | dev->stats.rx_bytes += pkt_len; |
890 | } else { | 888 | } else { |
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index 0418045166c3..0afa72095810 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
@@ -321,7 +321,6 @@ static int axnet_config(struct pcmcia_device *link) | |||
321 | struct net_device *dev = link->priv; | 321 | struct net_device *dev = link->priv; |
322 | axnet_dev_t *info = PRIV(dev); | 322 | axnet_dev_t *info = PRIV(dev); |
323 | int i, j, last_ret, last_fn; | 323 | int i, j, last_ret, last_fn; |
324 | DECLARE_MAC_BUF(mac); | ||
325 | 324 | ||
326 | DEBUG(0, "axnet_config(0x%p)\n", link); | 325 | DEBUG(0, "axnet_config(0x%p)\n", link); |
327 | 326 | ||
@@ -397,10 +396,10 @@ static int axnet_config(struct pcmcia_device *link) | |||
397 | strcpy(info->node.dev_name, dev->name); | 396 | strcpy(info->node.dev_name, dev->name); |
398 | 397 | ||
399 | printk(KERN_INFO "%s: Asix AX88%d90: io %#3lx, irq %d, " | 398 | printk(KERN_INFO "%s: Asix AX88%d90: io %#3lx, irq %d, " |
400 | "hw_addr %s\n", | 399 | "hw_addr %pM\n", |
401 | dev->name, ((info->flags & IS_AX88790) ? 7 : 1), | 400 | dev->name, ((info->flags & IS_AX88790) ? 7 : 1), |
402 | dev->base_addr, dev->irq, | 401 | dev->base_addr, dev->irq, |
403 | print_mac(mac, dev->dev_addr)); | 402 | dev->dev_addr); |
404 | if (info->phy_id != -1) { | 403 | if (info->phy_id != -1) { |
405 | DEBUG(0, " MII transceiver at index %d, status %x.\n", info->phy_id, j); | 404 | DEBUG(0, " MII transceiver at index %d, status %x.\n", info->phy_id, j); |
406 | } else { | 405 | } else { |
@@ -906,7 +905,7 @@ int ei_debug = 1; | |||
906 | /* Index to functions. */ | 905 | /* Index to functions. */ |
907 | static void ei_tx_intr(struct net_device *dev); | 906 | static void ei_tx_intr(struct net_device *dev); |
908 | static void ei_tx_err(struct net_device *dev); | 907 | static void ei_tx_err(struct net_device *dev); |
909 | static void ei_tx_timeout(struct net_device *dev); | 908 | static void axnet_tx_timeout(struct net_device *dev); |
910 | static void ei_receive(struct net_device *dev); | 909 | static void ei_receive(struct net_device *dev); |
911 | static void ei_rx_overrun(struct net_device *dev); | 910 | static void ei_rx_overrun(struct net_device *dev); |
912 | 911 | ||
@@ -957,9 +956,9 @@ static int ax_open(struct net_device *dev) | |||
957 | 956 | ||
958 | #ifdef HAVE_TX_TIMEOUT | 957 | #ifdef HAVE_TX_TIMEOUT |
959 | /* The card I/O part of the driver (e.g. 3c503) can hook a Tx timeout | 958 | /* The card I/O part of the driver (e.g. 3c503) can hook a Tx timeout |
960 | wrapper that does e.g. media check & then calls ei_tx_timeout. */ | 959 | wrapper that does e.g. media check & then calls axnet_tx_timeout. */ |
961 | if (dev->tx_timeout == NULL) | 960 | if (dev->tx_timeout == NULL) |
962 | dev->tx_timeout = ei_tx_timeout; | 961 | dev->tx_timeout = axnet_tx_timeout; |
963 | if (dev->watchdog_timeo <= 0) | 962 | if (dev->watchdog_timeo <= 0) |
964 | dev->watchdog_timeo = TX_TIMEOUT; | 963 | dev->watchdog_timeo = TX_TIMEOUT; |
965 | #endif | 964 | #endif |
@@ -1003,14 +1002,14 @@ static int ax_close(struct net_device *dev) | |||
1003 | } | 1002 | } |
1004 | 1003 | ||
1005 | /** | 1004 | /** |
1006 | * ei_tx_timeout - handle transmit time out condition | 1005 | * axnet_tx_timeout - handle transmit time out condition |
1007 | * @dev: network device which has apparently fallen asleep | 1006 | * @dev: network device which has apparently fallen asleep |
1008 | * | 1007 | * |
1009 | * Called by kernel when device never acknowledges a transmit has | 1008 | * Called by kernel when device never acknowledges a transmit has |
1010 | * completed (or failed) - i.e. never posted a Tx related interrupt. | 1009 | * completed (or failed) - i.e. never posted a Tx related interrupt. |
1011 | */ | 1010 | */ |
1012 | 1011 | ||
1013 | static void ei_tx_timeout(struct net_device *dev) | 1012 | static void axnet_tx_timeout(struct net_device *dev) |
1014 | { | 1013 | { |
1015 | long e8390_base = dev->base_addr; | 1014 | long e8390_base = dev->base_addr; |
1016 | struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); | 1015 | struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); |
@@ -1047,14 +1046,14 @@ static void ei_tx_timeout(struct net_device *dev) | |||
1047 | } | 1046 | } |
1048 | 1047 | ||
1049 | /** | 1048 | /** |
1050 | * ei_start_xmit - begin packet transmission | 1049 | * axnet_start_xmit - begin packet transmission |
1051 | * @skb: packet to be sent | 1050 | * @skb: packet to be sent |
1052 | * @dev: network device to which packet is sent | 1051 | * @dev: network device to which packet is sent |
1053 | * | 1052 | * |
1054 | * Sends a packet to an 8390 network device. | 1053 | * Sends a packet to an 8390 network device. |
1055 | */ | 1054 | */ |
1056 | 1055 | ||
1057 | static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev) | 1056 | static int axnet_start_xmit(struct sk_buff *skb, struct net_device *dev) |
1058 | { | 1057 | { |
1059 | long e8390_base = dev->base_addr; | 1058 | long e8390_base = dev->base_addr; |
1060 | struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); | 1059 | struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); |
@@ -1493,7 +1492,6 @@ static void ei_receive(struct net_device *dev) | |||
1493 | ei_block_input(dev, pkt_len, skb, current_offset + sizeof(rx_frame)); | 1492 | ei_block_input(dev, pkt_len, skb, current_offset + sizeof(rx_frame)); |
1494 | skb->protocol=eth_type_trans(skb,dev); | 1493 | skb->protocol=eth_type_trans(skb,dev); |
1495 | netif_rx(skb); | 1494 | netif_rx(skb); |
1496 | dev->last_rx = jiffies; | ||
1497 | dev->stats.rx_packets++; | 1495 | dev->stats.rx_packets++; |
1498 | dev->stats.rx_bytes += pkt_len; | 1496 | dev->stats.rx_bytes += pkt_len; |
1499 | if (pkt_stat & ENRSR_PHY) | 1497 | if (pkt_stat & ENRSR_PHY) |
@@ -1720,7 +1718,7 @@ static void axdev_setup(struct net_device *dev) | |||
1720 | ei_local = (struct ei_device *)netdev_priv(dev); | 1718 | ei_local = (struct ei_device *)netdev_priv(dev); |
1721 | spin_lock_init(&ei_local->page_lock); | 1719 | spin_lock_init(&ei_local->page_lock); |
1722 | 1720 | ||
1723 | dev->hard_start_xmit = &ei_start_xmit; | 1721 | dev->hard_start_xmit = &axnet_start_xmit; |
1724 | dev->get_stats = get_stats; | 1722 | dev->get_stats = get_stats; |
1725 | dev->set_multicast_list = &set_multicast_list; | 1723 | dev->set_multicast_list = &set_multicast_list; |
1726 | 1724 | ||
diff --git a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c index 831090c75622..7b5c77b7bd27 100644 --- a/drivers/net/pcmcia/com20020_cs.c +++ b/drivers/net/pcmcia/com20020_cs.c | |||
@@ -155,7 +155,7 @@ static int com20020_probe(struct pcmcia_device *p_dev) | |||
155 | if (!dev) | 155 | if (!dev) |
156 | goto fail_alloc_dev; | 156 | goto fail_alloc_dev; |
157 | 157 | ||
158 | lp = dev->priv; | 158 | lp = netdev_priv(dev); |
159 | lp->timeout = timeout; | 159 | lp->timeout = timeout; |
160 | lp->backplane = backplane; | 160 | lp->backplane = backplane; |
161 | lp->clockp = clockp; | 161 | lp->clockp = clockp; |
@@ -303,7 +303,7 @@ static int com20020_config(struct pcmcia_device *link) | |||
303 | goto failed; | 303 | goto failed; |
304 | } | 304 | } |
305 | 305 | ||
306 | lp = dev->priv; | 306 | lp = netdev_priv(dev); |
307 | lp->card_name = "PCMCIA COM20020"; | 307 | lp->card_name = "PCMCIA COM20020"; |
308 | lp->card_flags = ARC_CAN_10MBIT; /* pretend all of them can 10Mbit */ | 308 | lp->card_flags = ARC_CAN_10MBIT; /* pretend all of them can 10Mbit */ |
309 | 309 | ||
@@ -364,7 +364,7 @@ static int com20020_resume(struct pcmcia_device *link) | |||
364 | 364 | ||
365 | if (link->open) { | 365 | if (link->open) { |
366 | int ioaddr = dev->base_addr; | 366 | int ioaddr = dev->base_addr; |
367 | struct arcnet_local *lp = dev->priv; | 367 | struct arcnet_local *lp = netdev_priv(dev); |
368 | ARCRESET; | 368 | ARCRESET; |
369 | } | 369 | } |
370 | 370 | ||
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c index 69d916daa7bb..69dcfbbabe82 100644 --- a/drivers/net/pcmcia/fmvj18x_cs.c +++ b/drivers/net/pcmcia/fmvj18x_cs.c | |||
@@ -125,6 +125,7 @@ typedef struct local_info_t { | |||
125 | u_short tx_queue_len; | 125 | u_short tx_queue_len; |
126 | cardtype_t cardtype; | 126 | cardtype_t cardtype; |
127 | u_short sent; | 127 | u_short sent; |
128 | u_char __iomem *base; | ||
128 | } local_info_t; | 129 | } local_info_t; |
129 | 130 | ||
130 | #define MC_FILTERBREAK 64 | 131 | #define MC_FILTERBREAK 64 |
@@ -242,6 +243,7 @@ static int fmvj18x_probe(struct pcmcia_device *link) | |||
242 | lp = netdev_priv(dev); | 243 | lp = netdev_priv(dev); |
243 | link->priv = dev; | 244 | link->priv = dev; |
244 | lp->p_dev = link; | 245 | lp->p_dev = link; |
246 | lp->base = NULL; | ||
245 | 247 | ||
246 | /* The io structure describes IO port mapping */ | 248 | /* The io structure describes IO port mapping */ |
247 | link->io.NumPorts1 = 32; | 249 | link->io.NumPorts1 = 32; |
@@ -348,7 +350,6 @@ static int fmvj18x_config(struct pcmcia_device *link) | |||
348 | cardtype_t cardtype; | 350 | cardtype_t cardtype; |
349 | char *card_name = "unknown"; | 351 | char *card_name = "unknown"; |
350 | u_char *node_id; | 352 | u_char *node_id; |
351 | DECLARE_MAC_BUF(mac); | ||
352 | 353 | ||
353 | DEBUG(0, "fmvj18x_config(0x%p)\n", link); | 354 | DEBUG(0, "fmvj18x_config(0x%p)\n", link); |
354 | 355 | ||
@@ -443,8 +444,10 @@ static int fmvj18x_config(struct pcmcia_device *link) | |||
443 | dev->irq = link->irq.AssignedIRQ; | 444 | dev->irq = link->irq.AssignedIRQ; |
444 | dev->base_addr = link->io.BasePort1; | 445 | dev->base_addr = link->io.BasePort1; |
445 | 446 | ||
446 | if (link->io.BasePort2 != 0) | 447 | if (link->io.BasePort2 != 0) { |
447 | fmvj18x_setup_mfc(link); | 448 | ret = fmvj18x_setup_mfc(link); |
449 | if (ret != 0) goto failed; | ||
450 | } | ||
448 | 451 | ||
449 | ioaddr = dev->base_addr; | 452 | ioaddr = dev->base_addr; |
450 | 453 | ||
@@ -539,9 +542,9 @@ static int fmvj18x_config(struct pcmcia_device *link) | |||
539 | 542 | ||
540 | /* print current configuration */ | 543 | /* print current configuration */ |
541 | printk(KERN_INFO "%s: %s, sram %s, port %#3lx, irq %d, " | 544 | printk(KERN_INFO "%s: %s, sram %s, port %#3lx, irq %d, " |
542 | "hw_addr %s\n", | 545 | "hw_addr %pM\n", |
543 | dev->name, card_name, sram_config == 0 ? "4K TX*2" : "8K TX*2", | 546 | dev->name, card_name, sram_config == 0 ? "4K TX*2" : "8K TX*2", |
544 | dev->base_addr, dev->irq, print_mac(mac, dev->dev_addr)); | 547 | dev->base_addr, dev->irq, dev->dev_addr); |
545 | 548 | ||
546 | return 0; | 549 | return 0; |
547 | 550 | ||
@@ -611,10 +614,10 @@ static int fmvj18x_setup_mfc(struct pcmcia_device *link) | |||
611 | { | 614 | { |
612 | win_req_t req; | 615 | win_req_t req; |
613 | memreq_t mem; | 616 | memreq_t mem; |
614 | u_char __iomem *base; | 617 | int i; |
615 | int i, j; | ||
616 | struct net_device *dev = link->priv; | 618 | struct net_device *dev = link->priv; |
617 | unsigned int ioaddr; | 619 | unsigned int ioaddr; |
620 | local_info_t *lp = netdev_priv(dev); | ||
618 | 621 | ||
619 | /* Allocate a small memory window */ | 622 | /* Allocate a small memory window */ |
620 | req.Attributes = WIN_DATA_WIDTH_8|WIN_MEMORY_TYPE_AM|WIN_ENABLE; | 623 | req.Attributes = WIN_DATA_WIDTH_8|WIN_MEMORY_TYPE_AM|WIN_ENABLE; |
@@ -626,25 +629,32 @@ static int fmvj18x_setup_mfc(struct pcmcia_device *link) | |||
626 | return -1; | 629 | return -1; |
627 | } | 630 | } |
628 | 631 | ||
629 | base = ioremap(req.Base, req.Size); | 632 | lp->base = ioremap(req.Base, req.Size); |
633 | if (lp->base == NULL) { | ||
634 | printk(KERN_NOTICE "fmvj18x_cs: ioremap failed\n"); | ||
635 | return -1; | ||
636 | } | ||
637 | |||
630 | mem.Page = 0; | 638 | mem.Page = 0; |
631 | mem.CardOffset = 0; | 639 | mem.CardOffset = 0; |
632 | pcmcia_map_mem_page(link->win, &mem); | 640 | i = pcmcia_map_mem_page(link->win, &mem); |
633 | 641 | if (i != 0) { | |
642 | iounmap(lp->base); | ||
643 | lp->base = NULL; | ||
644 | cs_error(link, MapMemPage, i); | ||
645 | return -1; | ||
646 | } | ||
647 | |||
634 | ioaddr = dev->base_addr; | 648 | ioaddr = dev->base_addr; |
635 | writeb(0x47, base+0x800); /* Config Option Register of LAN */ | 649 | writeb(0x47, lp->base+0x800); /* Config Option Register of LAN */ |
636 | writeb(0x0, base+0x802); /* Config and Status Register */ | 650 | writeb(0x0, lp->base+0x802); /* Config and Status Register */ |
637 | 651 | ||
638 | writeb(ioaddr & 0xff, base+0x80a); /* I/O Base(Low) of LAN */ | 652 | writeb(ioaddr & 0xff, lp->base+0x80a); /* I/O Base(Low) of LAN */ |
639 | writeb((ioaddr >> 8) & 0xff, base+0x80c); /* I/O Base(High) of LAN */ | 653 | writeb((ioaddr >> 8) & 0xff, lp->base+0x80c); /* I/O Base(High) of LAN */ |
640 | 654 | ||
641 | writeb(0x45, base+0x820); /* Config Option Register of Modem */ | 655 | writeb(0x45, lp->base+0x820); /* Config Option Register of Modem */ |
642 | writeb(0x8, base+0x822); /* Config and Status Register */ | 656 | writeb(0x8, lp->base+0x822); /* Config and Status Register */ |
643 | 657 | ||
644 | iounmap(base); | ||
645 | j = pcmcia_release_window(link->win); | ||
646 | if (j != 0) | ||
647 | cs_error(link, ReleaseWindow, j); | ||
648 | return 0; | 658 | return 0; |
649 | 659 | ||
650 | } | 660 | } |
@@ -652,8 +662,25 @@ static int fmvj18x_setup_mfc(struct pcmcia_device *link) | |||
652 | 662 | ||
653 | static void fmvj18x_release(struct pcmcia_device *link) | 663 | static void fmvj18x_release(struct pcmcia_device *link) |
654 | { | 664 | { |
655 | DEBUG(0, "fmvj18x_release(0x%p)\n", link); | 665 | |
656 | pcmcia_disable_device(link); | 666 | struct net_device *dev = link->priv; |
667 | local_info_t *lp = netdev_priv(dev); | ||
668 | u_char __iomem *tmp; | ||
669 | int j; | ||
670 | |||
671 | DEBUG(0, "fmvj18x_release(0x%p)\n", link); | ||
672 | |||
673 | if (lp->base != NULL) { | ||
674 | tmp = lp->base; | ||
675 | lp->base = NULL; /* set NULL before iounmap */ | ||
676 | iounmap(tmp); | ||
677 | j = pcmcia_release_window(link->win); | ||
678 | if (j != 0) | ||
679 | cs_error(link, ReleaseWindow, j); | ||
680 | } | ||
681 | |||
682 | pcmcia_disable_device(link); | ||
683 | |||
657 | } | 684 | } |
658 | 685 | ||
659 | static int fmvj18x_suspend(struct pcmcia_device *link) | 686 | static int fmvj18x_suspend(struct pcmcia_device *link) |
@@ -784,6 +811,13 @@ static irqreturn_t fjn_interrupt(int dummy, void *dev_id) | |||
784 | 811 | ||
785 | outb(D_TX_INTR, ioaddr + TX_INTR); | 812 | outb(D_TX_INTR, ioaddr + TX_INTR); |
786 | outb(D_RX_INTR, ioaddr + RX_INTR); | 813 | outb(D_RX_INTR, ioaddr + RX_INTR); |
814 | |||
815 | if (lp->base != NULL) { | ||
816 | /* Ack interrupt for multifunction card */ | ||
817 | writeb(0x01, lp->base+0x802); | ||
818 | writeb(0x09, lp->base+0x822); | ||
819 | } | ||
820 | |||
787 | return IRQ_HANDLED; | 821 | return IRQ_HANDLED; |
788 | 822 | ||
789 | } /* fjn_interrupt */ | 823 | } /* fjn_interrupt */ |
@@ -1036,7 +1070,6 @@ static void fjn_rx(struct net_device *dev) | |||
1036 | #endif | 1070 | #endif |
1037 | 1071 | ||
1038 | netif_rx(skb); | 1072 | netif_rx(skb); |
1039 | dev->last_rx = jiffies; | ||
1040 | lp->stats.rx_packets++; | 1073 | lp->stats.rx_packets++; |
1041 | lp->stats.rx_bytes += pkt_len; | 1074 | lp->stats.rx_bytes += pkt_len; |
1042 | } | 1075 | } |
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c index 448cd40aeba5..ec7c588c9ae5 100644 --- a/drivers/net/pcmcia/nmclan_cs.c +++ b/drivers/net/pcmcia/nmclan_cs.c | |||
@@ -659,7 +659,6 @@ static int nmclan_config(struct pcmcia_device *link) | |||
659 | u_char buf[64]; | 659 | u_char buf[64]; |
660 | int i, last_ret, last_fn; | 660 | int i, last_ret, last_fn; |
661 | unsigned int ioaddr; | 661 | unsigned int ioaddr; |
662 | DECLARE_MAC_BUF(mac); | ||
663 | 662 | ||
664 | DEBUG(0, "nmclan_config(0x%p)\n", link); | 663 | DEBUG(0, "nmclan_config(0x%p)\n", link); |
665 | 664 | ||
@@ -719,9 +718,9 @@ static int nmclan_config(struct pcmcia_device *link) | |||
719 | strcpy(lp->node.dev_name, dev->name); | 718 | strcpy(lp->node.dev_name, dev->name); |
720 | 719 | ||
721 | printk(KERN_INFO "%s: nmclan: port %#3lx, irq %d, %s port," | 720 | printk(KERN_INFO "%s: nmclan: port %#3lx, irq %d, %s port," |
722 | " hw_addr %s\n", | 721 | " hw_addr %pM\n", |
723 | dev->name, dev->base_addr, dev->irq, if_names[dev->if_port], | 722 | dev->name, dev->base_addr, dev->irq, if_names[dev->if_port], |
724 | print_mac(mac, dev->dev_addr)); | 723 | dev->dev_addr); |
725 | return 0; | 724 | return 0; |
726 | 725 | ||
727 | cs_failed: | 726 | cs_failed: |
@@ -1193,7 +1192,6 @@ static int mace_rx(struct net_device *dev, unsigned char RxCnt) | |||
1193 | 1192 | ||
1194 | netif_rx(skb); /* Send the packet to the upper (protocol) layers. */ | 1193 | netif_rx(skb); /* Send the packet to the upper (protocol) layers. */ |
1195 | 1194 | ||
1196 | dev->last_rx = jiffies; | ||
1197 | lp->linux_stats.rx_packets++; | 1195 | lp->linux_stats.rx_packets++; |
1198 | lp->linux_stats.rx_bytes += pkt_len; | 1196 | lp->linux_stats.rx_bytes += pkt_len; |
1199 | outb(0xFF, ioaddr + AM2150_RCV_NEXT); /* skip to next frame */ | 1197 | outb(0xFF, ioaddr + AM2150_RCV_NEXT); /* skip to next frame */ |
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index ce486f094492..c38ed777f0a8 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
@@ -554,7 +554,6 @@ static int pcnet_config(struct pcmcia_device *link) | |||
554 | int last_ret, last_fn, start_pg, stop_pg, cm_offset; | 554 | int last_ret, last_fn, start_pg, stop_pg, cm_offset; |
555 | int has_shmem = 0; | 555 | int has_shmem = 0; |
556 | hw_info_t *local_hw_info; | 556 | hw_info_t *local_hw_info; |
557 | DECLARE_MAC_BUF(mac); | ||
558 | 557 | ||
559 | DEBUG(0, "pcnet_config(0x%p)\n", link); | 558 | DEBUG(0, "pcnet_config(0x%p)\n", link); |
560 | 559 | ||
@@ -675,7 +674,7 @@ static int pcnet_config(struct pcmcia_device *link) | |||
675 | printk (" mem %#5lx,", dev->mem_start); | 674 | printk (" mem %#5lx,", dev->mem_start); |
676 | if (info->flags & HAS_MISC_REG) | 675 | if (info->flags & HAS_MISC_REG) |
677 | printk(" %s xcvr,", if_names[dev->if_port]); | 676 | printk(" %s xcvr,", if_names[dev->if_port]); |
678 | printk(" hw_addr %s\n", print_mac(mac, dev->dev_addr)); | 677 | printk(" hw_addr %pM\n", dev->dev_addr); |
679 | return 0; | 678 | return 0; |
680 | 679 | ||
681 | cs_failed: | 680 | cs_failed: |
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index c74d6656d266..fccd53ef3c64 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c | |||
@@ -949,7 +949,6 @@ static int smc91c92_config(struct pcmcia_device *link) | |||
949 | int i, j, rev; | 949 | int i, j, rev; |
950 | unsigned int ioaddr; | 950 | unsigned int ioaddr; |
951 | u_long mir; | 951 | u_long mir; |
952 | DECLARE_MAC_BUF(mac); | ||
953 | 952 | ||
954 | DEBUG(0, "smc91c92_config(0x%p)\n", link); | 953 | DEBUG(0, "smc91c92_config(0x%p)\n", link); |
955 | 954 | ||
@@ -1062,9 +1061,9 @@ static int smc91c92_config(struct pcmcia_device *link) | |||
1062 | strcpy(smc->node.dev_name, dev->name); | 1061 | strcpy(smc->node.dev_name, dev->name); |
1063 | 1062 | ||
1064 | printk(KERN_INFO "%s: smc91c%s rev %d: io %#3lx, irq %d, " | 1063 | printk(KERN_INFO "%s: smc91c%s rev %d: io %#3lx, irq %d, " |
1065 | "hw_addr %s\n", | 1064 | "hw_addr %pM\n", |
1066 | dev->name, name, (rev & 0x0f), dev->base_addr, dev->irq, | 1065 | dev->name, name, (rev & 0x0f), dev->base_addr, dev->irq, |
1067 | print_mac(mac, dev->dev_addr)); | 1066 | dev->dev_addr); |
1068 | 1067 | ||
1069 | if (rev > 0) { | 1068 | if (rev > 0) { |
1070 | if (mir & 0x3ff) | 1069 | if (mir & 0x3ff) |
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c index e1fd585e7131..fef7e1861d6a 100644 --- a/drivers/net/pcmcia/xirc2ps_cs.c +++ b/drivers/net/pcmcia/xirc2ps_cs.c | |||
@@ -772,7 +772,6 @@ xirc2ps_config(struct pcmcia_device * link) | |||
772 | int err, i; | 772 | int err, i; |
773 | u_char buf[64]; | 773 | u_char buf[64]; |
774 | cistpl_lan_node_id_t *node_id = (cistpl_lan_node_id_t*)parse.funce.data; | 774 | cistpl_lan_node_id_t *node_id = (cistpl_lan_node_id_t*)parse.funce.data; |
775 | DECLARE_MAC_BUF(mac); | ||
776 | 775 | ||
777 | local->dingo_ccr = NULL; | 776 | local->dingo_ccr = NULL; |
778 | 777 | ||
@@ -1051,9 +1050,9 @@ xirc2ps_config(struct pcmcia_device * link) | |||
1051 | strcpy(local->node.dev_name, dev->name); | 1050 | strcpy(local->node.dev_name, dev->name); |
1052 | 1051 | ||
1053 | /* give some infos about the hardware */ | 1052 | /* give some infos about the hardware */ |
1054 | printk(KERN_INFO "%s: %s: port %#3lx, irq %d, hwaddr %s\n", | 1053 | printk(KERN_INFO "%s: %s: port %#3lx, irq %d, hwaddr %pM\n", |
1055 | dev->name, local->manf_str,(u_long)dev->base_addr, (int)dev->irq, | 1054 | dev->name, local->manf_str,(u_long)dev->base_addr, (int)dev->irq, |
1056 | print_mac(mac, dev->dev_addr)); | 1055 | dev->dev_addr); |
1057 | 1056 | ||
1058 | return 0; | 1057 | return 0; |
1059 | 1058 | ||
@@ -1243,7 +1242,6 @@ xirc2ps_interrupt(int irq, void *dev_id) | |||
1243 | } | 1242 | } |
1244 | skb->protocol = eth_type_trans(skb, dev); | 1243 | skb->protocol = eth_type_trans(skb, dev); |
1245 | netif_rx(skb); | 1244 | netif_rx(skb); |
1246 | dev->last_rx = jiffies; | ||
1247 | lp->stats.rx_packets++; | 1245 | lp->stats.rx_packets++; |
1248 | lp->stats.rx_bytes += pktlen; | 1246 | lp->stats.rx_bytes += pktlen; |
1249 | if (!(rsr & PhyPkt)) | 1247 | if (!(rsr & PhyPkt)) |