diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-11-05 14:38:55 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-11-05 14:38:55 -0500 |
commit | 328198acb7407301ddf6005c0fa1e04bd0c539c8 (patch) | |
tree | 9936112bd195bfbaacc9a75f2ea7ff757a2c0546 /drivers/net | |
parent | 9e0cb06b17be7e562cbdaba2768649f025826dc6 (diff) | |
parent | fecb4a0c87c2bcaee1f3cf800126eef752a07ed3 (diff) |
Merge branch 'master'
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/Kconfig | 2 | ||||
-rw-r--r-- | drivers/net/arm/am79c961a.c | 41 | ||||
-rw-r--r-- | drivers/net/arm/am79c961a.h | 2 | ||||
-rw-r--r-- | drivers/net/bmac.c | 1 | ||||
-rw-r--r-- | drivers/net/cs89x0.c | 14 | ||||
-rw-r--r-- | drivers/net/cs89x0.h | 2 | ||||
-rw-r--r-- | drivers/net/depca.c | 2 | ||||
-rw-r--r-- | drivers/net/dm9000.c | 1 | ||||
-rw-r--r-- | drivers/net/eepro.c | 50 | ||||
-rw-r--r-- | drivers/net/gianfar.c | 2 | ||||
-rw-r--r-- | drivers/net/gianfar_mii.c | 1 | ||||
-rw-r--r-- | drivers/net/ibmveth.c | 16 | ||||
-rw-r--r-- | drivers/net/irda/pxaficp_ir.c | 15 | ||||
-rw-r--r-- | drivers/net/irda/sa1100_ir.c | 2 | ||||
-rw-r--r-- | drivers/net/irda/smsc-ircc2.c | 130 | ||||
-rw-r--r-- | drivers/net/iseries_veth.c | 26 | ||||
-rw-r--r-- | drivers/net/jazzsonic.c | 2 | ||||
-rw-r--r-- | drivers/net/mace.c | 1 | ||||
-rw-r--r-- | drivers/net/macsonic.c | 2 | ||||
-rw-r--r-- | drivers/net/mipsnet.c | 1 | ||||
-rw-r--r-- | drivers/net/mv643xx_eth.c | 5 | ||||
-rw-r--r-- | drivers/net/skfp/smt.c | 2 | ||||
-rw-r--r-- | drivers/net/smc91x.c | 2 | ||||
-rw-r--r-- | drivers/net/smc91x.h | 12 | ||||
-rw-r--r-- | drivers/net/tokenring/proteon.c | 1 | ||||
-rw-r--r-- | drivers/net/tokenring/skisa.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/islpci_mgt.c | 2 |
27 files changed, 202 insertions, 136 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 97760c1e6b21..bb3bda312bbe 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -1374,7 +1374,7 @@ config FORCEDETH | |||
1374 | 1374 | ||
1375 | config CS89x0 | 1375 | config CS89x0 |
1376 | tristate "CS89x0 support" | 1376 | tristate "CS89x0 support" |
1377 | depends on (NET_PCI && (ISA || ARCH_IXDP2X01)) || ARCH_PNX0105 || MACH_MP1000 | 1377 | depends on (NET_PCI && (ISA || ARCH_IXDP2X01)) || ARCH_PNX0105 |
1378 | ---help--- | 1378 | ---help--- |
1379 | Support for CS89x0 chipset based Ethernet cards. If you have a | 1379 | Support for CS89x0 chipset based Ethernet cards. If you have a |
1380 | network (Ethernet) card of this type, say Y and read the | 1380 | network (Ethernet) card of this type, say Y and read the |
diff --git a/drivers/net/arm/am79c961a.c b/drivers/net/arm/am79c961a.c index 3d50e953faaa..877891a29aaa 100644 --- a/drivers/net/arm/am79c961a.c +++ b/drivers/net/arm/am79c961a.c | |||
@@ -26,11 +26,11 @@ | |||
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/crc32.h> | 27 | #include <linux/crc32.h> |
28 | #include <linux/bitops.h> | 28 | #include <linux/bitops.h> |
29 | #include <linux/platform_device.h> | ||
29 | 30 | ||
30 | #include <asm/system.h> | ||
31 | #include <asm/irq.h> | ||
32 | #include <asm/hardware.h> | 31 | #include <asm/hardware.h> |
33 | #include <asm/io.h> | 32 | #include <asm/io.h> |
33 | #include <asm/system.h> | ||
34 | 34 | ||
35 | #define TX_BUFFERS 15 | 35 | #define TX_BUFFERS 15 |
36 | #define RX_BUFFERS 25 | 36 | #define RX_BUFFERS 25 |
@@ -280,10 +280,13 @@ static void am79c961_timer(unsigned long data) | |||
280 | lnkstat = read_ireg(dev->base_addr, ISALED0) & ISALED0_LNKST; | 280 | lnkstat = read_ireg(dev->base_addr, ISALED0) & ISALED0_LNKST; |
281 | carrier = netif_carrier_ok(dev); | 281 | carrier = netif_carrier_ok(dev); |
282 | 282 | ||
283 | if (lnkstat && !carrier) | 283 | if (lnkstat && !carrier) { |
284 | netif_carrier_on(dev); | 284 | netif_carrier_on(dev); |
285 | else if (!lnkstat && carrier) | 285 | printk("%s: link up\n", dev->name); |
286 | } else if (!lnkstat && carrier) { | ||
286 | netif_carrier_off(dev); | 287 | netif_carrier_off(dev); |
288 | printk("%s: link down\n", dev->name); | ||
289 | } | ||
287 | 290 | ||
288 | mod_timer(&priv->timer, jiffies + msecs_to_jiffies(500)); | 291 | mod_timer(&priv->timer, jiffies + msecs_to_jiffies(500)); |
289 | } | 292 | } |
@@ -665,17 +668,25 @@ static void __init am79c961_banner(void) | |||
665 | printk(KERN_INFO "%s", version); | 668 | printk(KERN_INFO "%s", version); |
666 | } | 669 | } |
667 | 670 | ||
668 | static int __init am79c961_init(void) | 671 | static int __init am79c961_probe(struct device *_dev) |
669 | { | 672 | { |
673 | struct platform_device *pdev = to_platform_device(_dev); | ||
674 | struct resource *res; | ||
670 | struct net_device *dev; | 675 | struct net_device *dev; |
671 | struct dev_priv *priv; | 676 | struct dev_priv *priv; |
672 | int i, ret; | 677 | int i, ret; |
673 | 678 | ||
679 | res = platform_get_resource(pdev, IORESOURCE_IO, 0); | ||
680 | if (!res) | ||
681 | return -ENODEV; | ||
682 | |||
674 | dev = alloc_etherdev(sizeof(struct dev_priv)); | 683 | dev = alloc_etherdev(sizeof(struct dev_priv)); |
675 | ret = -ENOMEM; | 684 | ret = -ENOMEM; |
676 | if (!dev) | 685 | if (!dev) |
677 | goto out; | 686 | goto out; |
678 | 687 | ||
688 | SET_NETDEV_DEV(dev, &pdev->dev); | ||
689 | |||
679 | priv = netdev_priv(dev); | 690 | priv = netdev_priv(dev); |
680 | 691 | ||
681 | /* | 692 | /* |
@@ -683,8 +694,8 @@ static int __init am79c961_init(void) | |||
683 | * The PNP initialisation should have been | 694 | * The PNP initialisation should have been |
684 | * done by the ether bootp loader. | 695 | * done by the ether bootp loader. |
685 | */ | 696 | */ |
686 | dev->base_addr = 0x220; | 697 | dev->base_addr = res->start; |
687 | dev->irq = IRQ_EBSA110_ETHERNET; | 698 | dev->irq = platform_get_irq(pdev, 0); |
688 | 699 | ||
689 | ret = -ENODEV; | 700 | ret = -ENODEV; |
690 | if (!request_region(dev->base_addr, 0x18, dev->name)) | 701 | if (!request_region(dev->base_addr, 0x18, dev->name)) |
@@ -705,11 +716,11 @@ static int __init am79c961_init(void) | |||
705 | inb(dev->base_addr + 4) != 0x2b) | 716 | inb(dev->base_addr + 4) != 0x2b) |
706 | goto release; | 717 | goto release; |
707 | 718 | ||
708 | am79c961_banner(); | ||
709 | |||
710 | for (i = 0; i < 6; i++) | 719 | for (i = 0; i < 6; i++) |
711 | dev->dev_addr[i] = inb(dev->base_addr + i * 2) & 0xff; | 720 | dev->dev_addr[i] = inb(dev->base_addr + i * 2) & 0xff; |
712 | 721 | ||
722 | am79c961_banner(); | ||
723 | |||
713 | spin_lock_init(&priv->chip_lock); | 724 | spin_lock_init(&priv->chip_lock); |
714 | init_timer(&priv->timer); | 725 | init_timer(&priv->timer); |
715 | priv->timer.data = (unsigned long)dev; | 726 | priv->timer.data = (unsigned long)dev; |
@@ -732,6 +743,7 @@ static int __init am79c961_init(void) | |||
732 | if (ret == 0) { | 743 | if (ret == 0) { |
733 | printk(KERN_INFO "%s: ether address ", dev->name); | 744 | printk(KERN_INFO "%s: ether address ", dev->name); |
734 | 745 | ||
746 | /* Retrive and print the ethernet address. */ | ||
735 | for (i = 0; i < 6; i++) | 747 | for (i = 0; i < 6; i++) |
736 | printk (i == 5 ? "%02x\n" : "%02x:", dev->dev_addr[i]); | 748 | printk (i == 5 ? "%02x\n" : "%02x:", dev->dev_addr[i]); |
737 | 749 | ||
@@ -746,4 +758,15 @@ out: | |||
746 | return ret; | 758 | return ret; |
747 | } | 759 | } |
748 | 760 | ||
761 | static struct device_driver am79c961_driver = { | ||
762 | .name = "am79c961", | ||
763 | .bus = &platform_bus_type, | ||
764 | .probe = am79c961_probe, | ||
765 | }; | ||
766 | |||
767 | static int __init am79c961_init(void) | ||
768 | { | ||
769 | return driver_register(&am79c961_driver); | ||
770 | } | ||
771 | |||
749 | __initcall(am79c961_init); | 772 | __initcall(am79c961_init); |
diff --git a/drivers/net/arm/am79c961a.h b/drivers/net/arm/am79c961a.h index 1e9b05050cbe..6a49ac7f6d46 100644 --- a/drivers/net/arm/am79c961a.h +++ b/drivers/net/arm/am79c961a.h | |||
@@ -143,6 +143,4 @@ struct dev_priv { | |||
143 | struct timer_list timer; | 143 | struct timer_list timer; |
144 | }; | 144 | }; |
145 | 145 | ||
146 | extern int am79c961_probe (struct net_device *dev); | ||
147 | |||
148 | #endif | 146 | #endif |
diff --git a/drivers/net/bmac.c b/drivers/net/bmac.c index 73f2fcfc557f..bbca8ae8018c 100644 --- a/drivers/net/bmac.c +++ b/drivers/net/bmac.c | |||
@@ -1658,6 +1658,7 @@ static struct of_device_id bmac_match[] = | |||
1658 | }, | 1658 | }, |
1659 | {}, | 1659 | {}, |
1660 | }; | 1660 | }; |
1661 | MODULE_DEVICE_TABLE (of, bmac_match); | ||
1661 | 1662 | ||
1662 | static struct macio_driver bmac_driver = | 1663 | static struct macio_driver bmac_driver = |
1663 | { | 1664 | { |
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index bfdae10036ed..a6078ad9b654 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c | |||
@@ -182,10 +182,6 @@ static unsigned int cs8900_irq_map[] = {IRQ_IXDP2X01_CS8900, 0, 0, 0}; | |||
182 | #define CIRRUS_DEFAULT_IRQ VH_INTC_INT_NUM_CASCADED_INTERRUPT_1 /* Event inputs bank 1 - ID 35/bit 3 */ | 182 | #define CIRRUS_DEFAULT_IRQ VH_INTC_INT_NUM_CASCADED_INTERRUPT_1 /* Event inputs bank 1 - ID 35/bit 3 */ |
183 | static unsigned int netcard_portlist[] __initdata = {CIRRUS_DEFAULT_BASE, 0}; | 183 | static unsigned int netcard_portlist[] __initdata = {CIRRUS_DEFAULT_BASE, 0}; |
184 | static unsigned int cs8900_irq_map[] = {CIRRUS_DEFAULT_IRQ, 0, 0, 0}; | 184 | static unsigned int cs8900_irq_map[] = {CIRRUS_DEFAULT_IRQ, 0, 0, 0}; |
185 | #elif defined(CONFIG_MACH_MP1000) | ||
186 | #include <asm/arch/mp1000-seprom.h> | ||
187 | static unsigned int netcard_portlist[] __initdata = {MP1000_EIO_BASE+0x300, 0}; | ||
188 | static unsigned int cs8900_irq_map[] = {IRQ_EINT3,0,0,0}; | ||
189 | #else | 185 | #else |
190 | static unsigned int netcard_portlist[] __initdata = | 186 | static unsigned int netcard_portlist[] __initdata = |
191 | { 0x300, 0x320, 0x340, 0x360, 0x200, 0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x2e0, 0}; | 187 | { 0x300, 0x320, 0x340, 0x360, 0x200, 0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x2e0, 0}; |
@@ -594,10 +590,6 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular) | |||
594 | cnt -= j; | 590 | cnt -= j; |
595 | } | 591 | } |
596 | } else | 592 | } else |
597 | #elif defined(CONFIG_MACH_MP1000) | ||
598 | if (1) { | ||
599 | memcpy(dev->dev_addr, get_eeprom_mac_address(), ETH_ALEN); | ||
600 | } else | ||
601 | #endif | 593 | #endif |
602 | 594 | ||
603 | if ((readreg(dev, PP_SelfST) & (EEPROM_OK | EEPROM_PRESENT)) == | 595 | if ((readreg(dev, PP_SelfST) & (EEPROM_OK | EEPROM_PRESENT)) == |
@@ -657,10 +649,6 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular) | |||
657 | if (1) { | 649 | if (1) { |
658 | printk(KERN_NOTICE "cs89x0: No EEPROM on HiCO.SH4\n"); | 650 | printk(KERN_NOTICE "cs89x0: No EEPROM on HiCO.SH4\n"); |
659 | } else | 651 | } else |
660 | #elif defined(CONFIG_MACH_MP1000) | ||
661 | if (1) { | ||
662 | lp->force |= FORCE_RJ45; | ||
663 | } else | ||
664 | #endif | 652 | #endif |
665 | if ((readreg(dev, PP_SelfST) & EEPROM_PRESENT) == 0) | 653 | if ((readreg(dev, PP_SelfST) & EEPROM_PRESENT) == 0) |
666 | printk(KERN_WARNING "cs89x0: No EEPROM, relying on command line....\n"); | 654 | printk(KERN_WARNING "cs89x0: No EEPROM, relying on command line....\n"); |
@@ -1243,7 +1231,7 @@ net_open(struct net_device *dev) | |||
1243 | else | 1231 | else |
1244 | #endif | 1232 | #endif |
1245 | { | 1233 | { |
1246 | #if !defined(CONFIG_ARCH_IXDP2X01) && !defined(CONFIG_ARCH_PNX0105) && !defined(CONFIG_MACH_MP1000) | 1234 | #if !defined(CONFIG_ARCH_IXDP2X01) && !defined(CONFIG_ARCH_PNX0105) |
1247 | if (((1 << dev->irq) & lp->irq_map) == 0) { | 1235 | if (((1 << dev->irq) & lp->irq_map) == 0) { |
1248 | printk(KERN_ERR "%s: IRQ %d is not in our map of allowable IRQs, which is %x\n", | 1236 | printk(KERN_ERR "%s: IRQ %d is not in our map of allowable IRQs, which is %x\n", |
1249 | dev->name, dev->irq, lp->irq_map); | 1237 | dev->name, dev->irq, lp->irq_map); |
diff --git a/drivers/net/cs89x0.h b/drivers/net/cs89x0.h index f19d1ebe0183..decea264f121 100644 --- a/drivers/net/cs89x0.h +++ b/drivers/net/cs89x0.h | |||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/config.h> | 17 | #include <linux/config.h> |
18 | 18 | ||
19 | #if defined(CONFIG_ARCH_IXDP2X01) || defined(CONFIG_ARCH_PNX0105) || defined (CONFIG_MACH_MP1000) | 19 | #if defined(CONFIG_ARCH_IXDP2X01) || defined(CONFIG_ARCH_PNX0105) |
20 | /* IXDP2401/IXDP2801 uses dword-aligned register addressing */ | 20 | /* IXDP2401/IXDP2801 uses dword-aligned register addressing */ |
21 | #define CS89x0_PORT(reg) ((reg) * 2) | 21 | #define CS89x0_PORT(reg) ((reg) * 2) |
22 | #else | 22 | #else |
diff --git a/drivers/net/depca.c b/drivers/net/depca.c index c4aa5fe2840e..4d26e5e7d18b 100644 --- a/drivers/net/depca.c +++ b/drivers/net/depca.c | |||
@@ -254,7 +254,7 @@ | |||
254 | #include <linux/unistd.h> | 254 | #include <linux/unistd.h> |
255 | #include <linux/ctype.h> | 255 | #include <linux/ctype.h> |
256 | #include <linux/moduleparam.h> | 256 | #include <linux/moduleparam.h> |
257 | #include <linux/device.h> | 257 | #include <linux/platform_device.h> |
258 | #include <linux/bitops.h> | 258 | #include <linux/bitops.h> |
259 | 259 | ||
260 | #include <asm/uaccess.h> | 260 | #include <asm/uaccess.h> |
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c index abce1f730d00..c0af6fb1fbba 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c | |||
@@ -66,6 +66,7 @@ | |||
66 | #include <linux/mii.h> | 66 | #include <linux/mii.h> |
67 | #include <linux/dm9000.h> | 67 | #include <linux/dm9000.h> |
68 | #include <linux/delay.h> | 68 | #include <linux/delay.h> |
69 | #include <linux/platform_device.h> | ||
69 | 70 | ||
70 | #include <asm/delay.h> | 71 | #include <asm/delay.h> |
71 | #include <asm/irq.h> | 72 | #include <asm/irq.h> |
diff --git a/drivers/net/eepro.c b/drivers/net/eepro.c index 1ce2c675b8a7..a806dfe54d23 100644 --- a/drivers/net/eepro.c +++ b/drivers/net/eepro.c | |||
@@ -552,8 +552,7 @@ static int __init do_eepro_probe(struct net_device *dev) | |||
552 | { | 552 | { |
553 | unsigned short int WS[32]=WakeupSeq; | 553 | unsigned short int WS[32]=WakeupSeq; |
554 | 554 | ||
555 | if (check_region(WakeupPort, 2)==0) { | 555 | if (request_region(WakeupPort, 2, "eepro wakeup")) { |
556 | |||
557 | if (net_debug>5) | 556 | if (net_debug>5) |
558 | printk(KERN_DEBUG "Waking UP\n"); | 557 | printk(KERN_DEBUG "Waking UP\n"); |
559 | 558 | ||
@@ -563,7 +562,10 @@ static int __init do_eepro_probe(struct net_device *dev) | |||
563 | outb_p(WS[i],WakeupPort); | 562 | outb_p(WS[i],WakeupPort); |
564 | if (net_debug>5) printk(KERN_DEBUG ": %#x ",WS[i]); | 563 | if (net_debug>5) printk(KERN_DEBUG ": %#x ",WS[i]); |
565 | } | 564 | } |
566 | } else printk(KERN_WARNING "Checkregion Failed!\n"); | 565 | |
566 | release_region(WakeupPort, 2); | ||
567 | } else | ||
568 | printk(KERN_WARNING "PnP wakeup region busy!\n"); | ||
567 | } | 569 | } |
568 | #endif | 570 | #endif |
569 | 571 | ||
@@ -705,7 +707,7 @@ static void __init eepro_print_info (struct net_device *dev) | |||
705 | dev->name, (unsigned)dev->base_addr); | 707 | dev->name, (unsigned)dev->base_addr); |
706 | break; | 708 | break; |
707 | case LAN595FX: | 709 | case LAN595FX: |
708 | printk("%s: Intel EtherExpress Pro/10+ ISA\n at %#x,", | 710 | printk("%s: Intel EtherExpress Pro/10+ ISA\n at %#x,", |
709 | dev->name, (unsigned)dev->base_addr); | 711 | dev->name, (unsigned)dev->base_addr); |
710 | break; | 712 | break; |
711 | case LAN595TX: | 713 | case LAN595TX: |
@@ -713,7 +715,7 @@ static void __init eepro_print_info (struct net_device *dev) | |||
713 | dev->name, (unsigned)dev->base_addr); | 715 | dev->name, (unsigned)dev->base_addr); |
714 | break; | 716 | break; |
715 | case LAN595: | 717 | case LAN595: |
716 | printk("%s: Intel 82595-based lan card at %#x,", | 718 | printk("%s: Intel 82595-based lan card at %#x,", |
717 | dev->name, (unsigned)dev->base_addr); | 719 | dev->name, (unsigned)dev->base_addr); |
718 | } | 720 | } |
719 | 721 | ||
@@ -726,7 +728,7 @@ static void __init eepro_print_info (struct net_device *dev) | |||
726 | 728 | ||
727 | if (dev->irq > 2) | 729 | if (dev->irq > 2) |
728 | printk(", IRQ %d, %s.\n", dev->irq, ifmap[dev->if_port]); | 730 | printk(", IRQ %d, %s.\n", dev->irq, ifmap[dev->if_port]); |
729 | else | 731 | else |
730 | printk(", %s.\n", ifmap[dev->if_port]); | 732 | printk(", %s.\n", ifmap[dev->if_port]); |
731 | 733 | ||
732 | if (net_debug > 3) { | 734 | if (net_debug > 3) { |
@@ -756,7 +758,7 @@ static int __init eepro_probe1(struct net_device *dev, int autoprobe) | |||
756 | int err; | 758 | int err; |
757 | 759 | ||
758 | /* Grab the region so we can find another board if autoIRQ fails. */ | 760 | /* Grab the region so we can find another board if autoIRQ fails. */ |
759 | if (!request_region(ioaddr, EEPRO_IO_EXTENT, DRV_NAME)) { | 761 | if (!request_region(ioaddr, EEPRO_IO_EXTENT, DRV_NAME)) { |
760 | if (!autoprobe) | 762 | if (!autoprobe) |
761 | printk(KERN_WARNING "EEPRO: io-port 0x%04x in use \n", | 763 | printk(KERN_WARNING "EEPRO: io-port 0x%04x in use \n", |
762 | ioaddr); | 764 | ioaddr); |
@@ -838,15 +840,15 @@ static int __init eepro_probe1(struct net_device *dev, int autoprobe) | |||
838 | /* Mask off INT number */ | 840 | /* Mask off INT number */ |
839 | int count = lp->word[1] & 7; | 841 | int count = lp->word[1] & 7; |
840 | unsigned irqMask = lp->word[7]; | 842 | unsigned irqMask = lp->word[7]; |
841 | 843 | ||
842 | while (count--) | 844 | while (count--) |
843 | irqMask &= irqMask - 1; | 845 | irqMask &= irqMask - 1; |
844 | 846 | ||
845 | count = ffs(irqMask); | 847 | count = ffs(irqMask); |
846 | 848 | ||
847 | if (count) | 849 | if (count) |
848 | dev->irq = count - 1; | 850 | dev->irq = count - 1; |
849 | 851 | ||
850 | if (dev->irq < 2) { | 852 | if (dev->irq < 2) { |
851 | printk(KERN_ERR " Duh! illegal interrupt vector stored in EEPROM.\n"); | 853 | printk(KERN_ERR " Duh! illegal interrupt vector stored in EEPROM.\n"); |
852 | goto exit; | 854 | goto exit; |
@@ -854,7 +856,7 @@ static int __init eepro_probe1(struct net_device *dev, int autoprobe) | |||
854 | dev->irq = 9; | 856 | dev->irq = 9; |
855 | } | 857 | } |
856 | } | 858 | } |
857 | 859 | ||
858 | dev->open = eepro_open; | 860 | dev->open = eepro_open; |
859 | dev->stop = eepro_close; | 861 | dev->stop = eepro_close; |
860 | dev->hard_start_xmit = eepro_send_packet; | 862 | dev->hard_start_xmit = eepro_send_packet; |
@@ -863,7 +865,7 @@ static int __init eepro_probe1(struct net_device *dev, int autoprobe) | |||
863 | dev->tx_timeout = eepro_tx_timeout; | 865 | dev->tx_timeout = eepro_tx_timeout; |
864 | dev->watchdog_timeo = TX_TIMEOUT; | 866 | dev->watchdog_timeo = TX_TIMEOUT; |
865 | dev->ethtool_ops = &eepro_ethtool_ops; | 867 | dev->ethtool_ops = &eepro_ethtool_ops; |
866 | 868 | ||
867 | /* print boot time info */ | 869 | /* print boot time info */ |
868 | eepro_print_info(dev); | 870 | eepro_print_info(dev); |
869 | 871 | ||
@@ -1047,8 +1049,8 @@ static int eepro_open(struct net_device *dev) | |||
1047 | 1049 | ||
1048 | 1050 | ||
1049 | /* Initialize the RCV and XMT upper and lower limits */ | 1051 | /* Initialize the RCV and XMT upper and lower limits */ |
1050 | outb(lp->rcv_lower_limit >> 8, ioaddr + RCV_LOWER_LIMIT_REG); | 1052 | outb(lp->rcv_lower_limit >> 8, ioaddr + RCV_LOWER_LIMIT_REG); |
1051 | outb(lp->rcv_upper_limit >> 8, ioaddr + RCV_UPPER_LIMIT_REG); | 1053 | outb(lp->rcv_upper_limit >> 8, ioaddr + RCV_UPPER_LIMIT_REG); |
1052 | outb(lp->xmt_lower_limit >> 8, ioaddr + lp->xmt_lower_limit_reg); | 1054 | outb(lp->xmt_lower_limit >> 8, ioaddr + lp->xmt_lower_limit_reg); |
1053 | outb(lp->xmt_upper_limit >> 8, ioaddr + lp->xmt_upper_limit_reg); | 1055 | outb(lp->xmt_upper_limit >> 8, ioaddr + lp->xmt_upper_limit_reg); |
1054 | 1056 | ||
@@ -1065,12 +1067,12 @@ static int eepro_open(struct net_device *dev) | |||
1065 | eepro_clear_int(ioaddr); | 1067 | eepro_clear_int(ioaddr); |
1066 | 1068 | ||
1067 | /* Initialize RCV */ | 1069 | /* Initialize RCV */ |
1068 | outw(lp->rcv_lower_limit, ioaddr + RCV_BAR); | 1070 | outw(lp->rcv_lower_limit, ioaddr + RCV_BAR); |
1069 | lp->rx_start = lp->rcv_lower_limit; | 1071 | lp->rx_start = lp->rcv_lower_limit; |
1070 | outw(lp->rcv_upper_limit | 0xfe, ioaddr + RCV_STOP); | 1072 | outw(lp->rcv_upper_limit | 0xfe, ioaddr + RCV_STOP); |
1071 | 1073 | ||
1072 | /* Initialize XMT */ | 1074 | /* Initialize XMT */ |
1073 | outw(lp->xmt_lower_limit, ioaddr + lp->xmt_bar); | 1075 | outw(lp->xmt_lower_limit, ioaddr + lp->xmt_bar); |
1074 | lp->tx_start = lp->tx_end = lp->xmt_lower_limit; | 1076 | lp->tx_start = lp->tx_end = lp->xmt_lower_limit; |
1075 | lp->tx_last = 0; | 1077 | lp->tx_last = 0; |
1076 | 1078 | ||
@@ -1411,7 +1413,7 @@ set_multicast_list(struct net_device *dev) | |||
1411 | outb(0x08, ioaddr + STATUS_REG); | 1413 | outb(0x08, ioaddr + STATUS_REG); |
1412 | 1414 | ||
1413 | if (i & 0x20) { /* command ABORTed */ | 1415 | if (i & 0x20) { /* command ABORTed */ |
1414 | printk(KERN_NOTICE "%s: multicast setup failed.\n", | 1416 | printk(KERN_NOTICE "%s: multicast setup failed.\n", |
1415 | dev->name); | 1417 | dev->name); |
1416 | break; | 1418 | break; |
1417 | } else if ((i & 0x0f) == 0x03) { /* MC-Done */ | 1419 | } else if ((i & 0x0f) == 0x03) { /* MC-Done */ |
@@ -1512,7 +1514,7 @@ hardware_send_packet(struct net_device *dev, void *buf, short length) | |||
1512 | end = last + (((length + 3) >> 1) << 1) + XMT_HEADER; | 1514 | end = last + (((length + 3) >> 1) << 1) + XMT_HEADER; |
1513 | 1515 | ||
1514 | if (end >= lp->xmt_upper_limit + 2) { /* the transmit buffer is wrapped around */ | 1516 | if (end >= lp->xmt_upper_limit + 2) { /* the transmit buffer is wrapped around */ |
1515 | if ((lp->xmt_upper_limit + 2 - last) <= XMT_HEADER) { | 1517 | if ((lp->xmt_upper_limit + 2 - last) <= XMT_HEADER) { |
1516 | /* Arrrr!!!, must keep the xmt header together, | 1518 | /* Arrrr!!!, must keep the xmt header together, |
1517 | several days were lost to chase this one down. */ | 1519 | several days were lost to chase this one down. */ |
1518 | last = lp->xmt_lower_limit; | 1520 | last = lp->xmt_lower_limit; |
@@ -1643,7 +1645,7 @@ eepro_rx(struct net_device *dev) | |||
1643 | else if (rcv_status & 0x0800) | 1645 | else if (rcv_status & 0x0800) |
1644 | lp->stats.rx_crc_errors++; | 1646 | lp->stats.rx_crc_errors++; |
1645 | 1647 | ||
1646 | printk(KERN_DEBUG "%s: event = %#x, status = %#x, next = %#x, size = %#x\n", | 1648 | printk(KERN_DEBUG "%s: event = %#x, status = %#x, next = %#x, size = %#x\n", |
1647 | dev->name, rcv_event, rcv_status, rcv_next_frame, rcv_size); | 1649 | dev->name, rcv_event, rcv_status, rcv_next_frame, rcv_size); |
1648 | } | 1650 | } |
1649 | 1651 | ||
@@ -1674,10 +1676,10 @@ eepro_transmit_interrupt(struct net_device *dev) | |||
1674 | { | 1676 | { |
1675 | struct eepro_local *lp = netdev_priv(dev); | 1677 | struct eepro_local *lp = netdev_priv(dev); |
1676 | short ioaddr = dev->base_addr; | 1678 | short ioaddr = dev->base_addr; |
1677 | short boguscount = 25; | 1679 | short boguscount = 25; |
1678 | short xmt_status; | 1680 | short xmt_status; |
1679 | 1681 | ||
1680 | while ((lp->tx_start != lp->tx_end) && boguscount--) { | 1682 | while ((lp->tx_start != lp->tx_end) && boguscount--) { |
1681 | 1683 | ||
1682 | outw(lp->tx_start, ioaddr + HOST_ADDRESS_REG); | 1684 | outw(lp->tx_start, ioaddr + HOST_ADDRESS_REG); |
1683 | xmt_status = inw(ioaddr+IO_PORT); | 1685 | xmt_status = inw(ioaddr+IO_PORT); |
@@ -1723,7 +1725,7 @@ static int eepro_ethtool_get_settings(struct net_device *dev, | |||
1723 | { | 1725 | { |
1724 | struct eepro_local *lp = (struct eepro_local *)dev->priv; | 1726 | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
1725 | 1727 | ||
1726 | cmd->supported = SUPPORTED_10baseT_Half | | 1728 | cmd->supported = SUPPORTED_10baseT_Half | |
1727 | SUPPORTED_10baseT_Full | | 1729 | SUPPORTED_10baseT_Full | |
1728 | SUPPORTED_Autoneg; | 1730 | SUPPORTED_Autoneg; |
1729 | cmd->advertising = ADVERTISED_10baseT_Half | | 1731 | cmd->advertising = ADVERTISED_10baseT_Half | |
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index ae5a2ed3b264..962580f2c4ab 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -81,7 +81,7 @@ | |||
81 | #include <linux/if_vlan.h> | 81 | #include <linux/if_vlan.h> |
82 | #include <linux/spinlock.h> | 82 | #include <linux/spinlock.h> |
83 | #include <linux/mm.h> | 83 | #include <linux/mm.h> |
84 | #include <linux/device.h> | 84 | #include <linux/platform_device.h> |
85 | #include <linux/ip.h> | 85 | #include <linux/ip.h> |
86 | #include <linux/tcp.h> | 86 | #include <linux/tcp.h> |
87 | #include <linux/udp.h> | 87 | #include <linux/udp.h> |
diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c index 1eca1dbca7f1..5a74d3d3dbe1 100644 --- a/drivers/net/gianfar_mii.c +++ b/drivers/net/gianfar_mii.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/mm.h> | 33 | #include <linux/mm.h> |
34 | #include <linux/module.h> | 34 | #include <linux/module.h> |
35 | #include <linux/version.h> | 35 | #include <linux/version.h> |
36 | #include <linux/platform_device.h> | ||
36 | #include <asm/ocp.h> | 37 | #include <asm/ocp.h> |
37 | #include <linux/crc32.h> | 38 | #include <linux/crc32.h> |
38 | #include <linux/mii.h> | 39 | #include <linux/mii.h> |
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c index 36da54ad2b7b..94239f67f3a3 100644 --- a/drivers/net/ibmveth.c +++ b/drivers/net/ibmveth.c | |||
@@ -514,7 +514,7 @@ static int ibmveth_open(struct net_device *netdev) | |||
514 | 514 | ||
515 | if(lpar_rc != H_Success) { | 515 | if(lpar_rc != H_Success) { |
516 | ibmveth_error_printk("h_register_logical_lan failed with %ld\n", lpar_rc); | 516 | ibmveth_error_printk("h_register_logical_lan failed with %ld\n", lpar_rc); |
517 | ibmveth_error_printk("buffer TCE:0x%x filter TCE:0x%x rxq desc:0x%lx MAC:0x%lx\n", | 517 | ibmveth_error_printk("buffer TCE:0x%lx filter TCE:0x%lx rxq desc:0x%lx MAC:0x%lx\n", |
518 | adapter->buffer_list_dma, | 518 | adapter->buffer_list_dma, |
519 | adapter->filter_list_dma, | 519 | adapter->filter_list_dma, |
520 | rxq_desc.desc, | 520 | rxq_desc.desc, |
@@ -535,7 +535,7 @@ static int ibmveth_open(struct net_device *netdev) | |||
535 | } | 535 | } |
536 | 536 | ||
537 | ibmveth_debug_printk("initial replenish cycle\n"); | 537 | ibmveth_debug_printk("initial replenish cycle\n"); |
538 | ibmveth_replenish_task(adapter); | 538 | ibmveth_interrupt(netdev->irq, netdev, NULL); |
539 | 539 | ||
540 | netif_start_queue(netdev); | 540 | netif_start_queue(netdev); |
541 | 541 | ||
@@ -1174,14 +1174,16 @@ static struct vio_device_id ibmveth_device_table[] __devinitdata= { | |||
1174 | { "network", "IBM,l-lan"}, | 1174 | { "network", "IBM,l-lan"}, |
1175 | { "", "" } | 1175 | { "", "" } |
1176 | }; | 1176 | }; |
1177 | |||
1178 | MODULE_DEVICE_TABLE(vio, ibmveth_device_table); | 1177 | MODULE_DEVICE_TABLE(vio, ibmveth_device_table); |
1179 | 1178 | ||
1180 | static struct vio_driver ibmveth_driver = { | 1179 | static struct vio_driver ibmveth_driver = { |
1181 | .name = (char *)ibmveth_driver_name, | 1180 | .id_table = ibmveth_device_table, |
1182 | .id_table = ibmveth_device_table, | 1181 | .probe = ibmveth_probe, |
1183 | .probe = ibmveth_probe, | 1182 | .remove = ibmveth_remove, |
1184 | .remove = ibmveth_remove | 1183 | .driver = { |
1184 | .name = ibmveth_driver_name, | ||
1185 | .owner = THIS_MODULE, | ||
1186 | } | ||
1185 | }; | 1187 | }; |
1186 | 1188 | ||
1187 | static int __init ibmveth_module_init(void) | 1189 | static int __init ibmveth_module_init(void) |
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c index aef80f5e7c9c..e1aa9910503b 100644 --- a/drivers/net/irda/pxaficp_ir.c +++ b/drivers/net/irda/pxaficp_ir.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/rtnetlink.h> | 22 | #include <linux/rtnetlink.h> |
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/dma-mapping.h> | 24 | #include <linux/dma-mapping.h> |
25 | #include <linux/platform_device.h> | ||
25 | #include <linux/pm.h> | 26 | #include <linux/pm.h> |
26 | 27 | ||
27 | #include <net/irda/irda.h> | 28 | #include <net/irda/irda.h> |
@@ -704,15 +705,12 @@ static int pxa_irda_stop(struct net_device *dev) | |||
704 | return 0; | 705 | return 0; |
705 | } | 706 | } |
706 | 707 | ||
707 | static int pxa_irda_suspend(struct device *_dev, pm_message_t state, u32 level) | 708 | static int pxa_irda_suspend(struct device *_dev, pm_message_t state) |
708 | { | 709 | { |
709 | struct net_device *dev = dev_get_drvdata(_dev); | 710 | struct net_device *dev = dev_get_drvdata(_dev); |
710 | struct pxa_irda *si; | 711 | struct pxa_irda *si; |
711 | 712 | ||
712 | if (!dev || level != SUSPEND_DISABLE) | 713 | if (dev && netif_running(dev)) { |
713 | return 0; | ||
714 | |||
715 | if (netif_running(dev)) { | ||
716 | si = netdev_priv(dev); | 714 | si = netdev_priv(dev); |
717 | netif_device_detach(dev); | 715 | netif_device_detach(dev); |
718 | pxa_irda_shutdown(si); | 716 | pxa_irda_shutdown(si); |
@@ -721,15 +719,12 @@ static int pxa_irda_suspend(struct device *_dev, pm_message_t state, u32 level) | |||
721 | return 0; | 719 | return 0; |
722 | } | 720 | } |
723 | 721 | ||
724 | static int pxa_irda_resume(struct device *_dev, u32 level) | 722 | static int pxa_irda_resume(struct device *_dev) |
725 | { | 723 | { |
726 | struct net_device *dev = dev_get_drvdata(_dev); | 724 | struct net_device *dev = dev_get_drvdata(_dev); |
727 | struct pxa_irda *si; | 725 | struct pxa_irda *si; |
728 | 726 | ||
729 | if (!dev || level != RESUME_ENABLE) | 727 | if (dev && netif_running(dev)) { |
730 | return 0; | ||
731 | |||
732 | if (netif_running(dev)) { | ||
733 | si = netdev_priv(dev); | 728 | si = netdev_priv(dev); |
734 | pxa_irda_startup(si); | 729 | pxa_irda_startup(si); |
735 | netif_device_attach(dev); | 730 | netif_device_attach(dev); |
diff --git a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c index 06883309916d..76e0b9fb5e96 100644 --- a/drivers/net/irda/sa1100_ir.c +++ b/drivers/net/irda/sa1100_ir.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <linux/rtnetlink.h> | 29 | #include <linux/rtnetlink.h> |
30 | #include <linux/interrupt.h> | 30 | #include <linux/interrupt.h> |
31 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
32 | #include <linux/device.h> | 32 | #include <linux/platform_device.h> |
33 | #include <linux/dma-mapping.h> | 33 | #include <linux/dma-mapping.h> |
34 | 34 | ||
35 | #include <net/irda/irda.h> | 35 | #include <net/irda/irda.h> |
diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c index bbac720cca63..a1d207f2fa68 100644 --- a/drivers/net/irda/smsc-ircc2.c +++ b/drivers/net/irda/smsc-ircc2.c | |||
@@ -53,6 +53,7 @@ | |||
53 | #include <linux/rtnetlink.h> | 53 | #include <linux/rtnetlink.h> |
54 | #include <linux/serial_reg.h> | 54 | #include <linux/serial_reg.h> |
55 | #include <linux/dma-mapping.h> | 55 | #include <linux/dma-mapping.h> |
56 | #include <linux/platform_device.h> | ||
56 | 57 | ||
57 | #include <asm/io.h> | 58 | #include <asm/io.h> |
58 | #include <asm/dma.h> | 59 | #include <asm/dma.h> |
@@ -638,21 +639,14 @@ static void smsc_ircc_setup_qos(struct smsc_ircc_cb *self) | |||
638 | */ | 639 | */ |
639 | static void smsc_ircc_init_chip(struct smsc_ircc_cb *self) | 640 | static void smsc_ircc_init_chip(struct smsc_ircc_cb *self) |
640 | { | 641 | { |
641 | int iobase, ir_mode, ctrl, fast; | 642 | int iobase = self->io.fir_base; |
642 | |||
643 | IRDA_ASSERT(self != NULL, return;); | ||
644 | |||
645 | iobase = self->io.fir_base; | ||
646 | ir_mode = IRCC_CFGA_IRDA_SIR_A; | ||
647 | ctrl = 0; | ||
648 | fast = 0; | ||
649 | 643 | ||
650 | register_bank(iobase, 0); | 644 | register_bank(iobase, 0); |
651 | outb(IRCC_MASTER_RESET, iobase + IRCC_MASTER); | 645 | outb(IRCC_MASTER_RESET, iobase + IRCC_MASTER); |
652 | outb(0x00, iobase + IRCC_MASTER); | 646 | outb(0x00, iobase + IRCC_MASTER); |
653 | 647 | ||
654 | register_bank(iobase, 1); | 648 | register_bank(iobase, 1); |
655 | outb(((inb(iobase + IRCC_SCE_CFGA) & 0x87) | ir_mode), | 649 | outb(((inb(iobase + IRCC_SCE_CFGA) & 0x87) | IRCC_CFGA_IRDA_SIR_A), |
656 | iobase + IRCC_SCE_CFGA); | 650 | iobase + IRCC_SCE_CFGA); |
657 | 651 | ||
658 | #ifdef smsc_669 /* Uses pin 88/89 for Rx/Tx */ | 652 | #ifdef smsc_669 /* Uses pin 88/89 for Rx/Tx */ |
@@ -666,10 +660,10 @@ static void smsc_ircc_init_chip(struct smsc_ircc_cb *self) | |||
666 | outb(SMSC_IRCC2_FIFO_THRESHOLD, iobase + IRCC_FIFO_THRESHOLD); | 660 | outb(SMSC_IRCC2_FIFO_THRESHOLD, iobase + IRCC_FIFO_THRESHOLD); |
667 | 661 | ||
668 | register_bank(iobase, 4); | 662 | register_bank(iobase, 4); |
669 | outb((inb(iobase + IRCC_CONTROL) & 0x30) | ctrl, iobase + IRCC_CONTROL); | 663 | outb((inb(iobase + IRCC_CONTROL) & 0x30), iobase + IRCC_CONTROL); |
670 | 664 | ||
671 | register_bank(iobase, 0); | 665 | register_bank(iobase, 0); |
672 | outb(fast, iobase + IRCC_LCR_A); | 666 | outb(0, iobase + IRCC_LCR_A); |
673 | 667 | ||
674 | smsc_ircc_set_sir_speed(self, SMSC_IRCC2_C_IRDA_FALLBACK_SPEED); | 668 | smsc_ircc_set_sir_speed(self, SMSC_IRCC2_C_IRDA_FALLBACK_SPEED); |
675 | 669 | ||
@@ -1556,6 +1550,46 @@ static int ircc_is_receiving(struct smsc_ircc_cb *self) | |||
1556 | } | 1550 | } |
1557 | #endif /* unused */ | 1551 | #endif /* unused */ |
1558 | 1552 | ||
1553 | static int smsc_ircc_request_irq(struct smsc_ircc_cb *self) | ||
1554 | { | ||
1555 | int error; | ||
1556 | |||
1557 | error = request_irq(self->io.irq, smsc_ircc_interrupt, 0, | ||
1558 | self->netdev->name, self->netdev); | ||
1559 | if (error) | ||
1560 | IRDA_DEBUG(0, "%s(), unable to allocate irq=%d, err=%d\n", | ||
1561 | __FUNCTION__, self->io.irq, error); | ||
1562 | |||
1563 | return error; | ||
1564 | } | ||
1565 | |||
1566 | static void smsc_ircc_start_interrupts(struct smsc_ircc_cb *self) | ||
1567 | { | ||
1568 | unsigned long flags; | ||
1569 | |||
1570 | spin_lock_irqsave(&self->lock, flags); | ||
1571 | |||
1572 | self->io.speed = 0; | ||
1573 | smsc_ircc_change_speed(self, SMSC_IRCC2_C_IRDA_FALLBACK_SPEED); | ||
1574 | |||
1575 | spin_unlock_irqrestore(&self->lock, flags); | ||
1576 | } | ||
1577 | |||
1578 | static void smsc_ircc_stop_interrupts(struct smsc_ircc_cb *self) | ||
1579 | { | ||
1580 | int iobase = self->io.fir_base; | ||
1581 | unsigned long flags; | ||
1582 | |||
1583 | spin_lock_irqsave(&self->lock, flags); | ||
1584 | |||
1585 | register_bank(iobase, 0); | ||
1586 | outb(0, iobase + IRCC_IER); | ||
1587 | outb(IRCC_MASTER_RESET, iobase + IRCC_MASTER); | ||
1588 | outb(0x00, iobase + IRCC_MASTER); | ||
1589 | |||
1590 | spin_unlock_irqrestore(&self->lock, flags); | ||
1591 | } | ||
1592 | |||
1559 | 1593 | ||
1560 | /* | 1594 | /* |
1561 | * Function smsc_ircc_net_open (dev) | 1595 | * Function smsc_ircc_net_open (dev) |
@@ -1567,7 +1601,6 @@ static int smsc_ircc_net_open(struct net_device *dev) | |||
1567 | { | 1601 | { |
1568 | struct smsc_ircc_cb *self; | 1602 | struct smsc_ircc_cb *self; |
1569 | char hwname[16]; | 1603 | char hwname[16]; |
1570 | unsigned long flags; | ||
1571 | 1604 | ||
1572 | IRDA_DEBUG(1, "%s\n", __FUNCTION__); | 1605 | IRDA_DEBUG(1, "%s\n", __FUNCTION__); |
1573 | 1606 | ||
@@ -1575,6 +1608,11 @@ static int smsc_ircc_net_open(struct net_device *dev) | |||
1575 | self = netdev_priv(dev); | 1608 | self = netdev_priv(dev); |
1576 | IRDA_ASSERT(self != NULL, return 0;); | 1609 | IRDA_ASSERT(self != NULL, return 0;); |
1577 | 1610 | ||
1611 | if (self->io.suspended) { | ||
1612 | IRDA_DEBUG(0, "%s(), device is suspended\n", __FUNCTION__); | ||
1613 | return -EAGAIN; | ||
1614 | } | ||
1615 | |||
1578 | if (request_irq(self->io.irq, smsc_ircc_interrupt, 0, dev->name, | 1616 | if (request_irq(self->io.irq, smsc_ircc_interrupt, 0, dev->name, |
1579 | (void *) dev)) { | 1617 | (void *) dev)) { |
1580 | IRDA_DEBUG(0, "%s(), unable to allocate irq=%d\n", | 1618 | IRDA_DEBUG(0, "%s(), unable to allocate irq=%d\n", |
@@ -1582,11 +1620,7 @@ static int smsc_ircc_net_open(struct net_device *dev) | |||
1582 | return -EAGAIN; | 1620 | return -EAGAIN; |
1583 | } | 1621 | } |
1584 | 1622 | ||
1585 | spin_lock_irqsave(&self->lock, flags); | 1623 | smsc_ircc_start_interrupts(self); |
1586 | /*smsc_ircc_sir_start(self);*/ | ||
1587 | self->io.speed = 0; | ||
1588 | smsc_ircc_change_speed(self, SMSC_IRCC2_C_IRDA_FALLBACK_SPEED); | ||
1589 | spin_unlock_irqrestore(&self->lock, flags); | ||
1590 | 1624 | ||
1591 | /* Give self a hardware name */ | 1625 | /* Give self a hardware name */ |
1592 | /* It would be cool to offer the chip revision here - Jean II */ | 1626 | /* It would be cool to offer the chip revision here - Jean II */ |
@@ -1639,7 +1673,12 @@ static int smsc_ircc_net_close(struct net_device *dev) | |||
1639 | irlap_close(self->irlap); | 1673 | irlap_close(self->irlap); |
1640 | self->irlap = NULL; | 1674 | self->irlap = NULL; |
1641 | 1675 | ||
1642 | free_irq(self->io.irq, dev); | 1676 | smsc_ircc_stop_interrupts(self); |
1677 | |||
1678 | /* if we are called from smsc_ircc_resume we don't have IRQ reserved */ | ||
1679 | if (!self->io.suspended) | ||
1680 | free_irq(self->io.irq, dev); | ||
1681 | |||
1643 | disable_dma(self->io.dma); | 1682 | disable_dma(self->io.dma); |
1644 | free_dma(self->io.dma); | 1683 | free_dma(self->io.dma); |
1645 | 1684 | ||
@@ -1650,11 +1689,18 @@ static int smsc_ircc_suspend(struct device *dev, pm_message_t state) | |||
1650 | { | 1689 | { |
1651 | struct smsc_ircc_cb *self = dev_get_drvdata(dev); | 1690 | struct smsc_ircc_cb *self = dev_get_drvdata(dev); |
1652 | 1691 | ||
1653 | IRDA_MESSAGE("%s, Suspending\n", driver_name); | ||
1654 | |||
1655 | if (!self->io.suspended) { | 1692 | if (!self->io.suspended) { |
1656 | smsc_ircc_net_close(self->netdev); | 1693 | IRDA_DEBUG(1, "%s, Suspending\n", driver_name); |
1694 | |||
1695 | rtnl_lock(); | ||
1696 | if (netif_running(self->netdev)) { | ||
1697 | netif_device_detach(self->netdev); | ||
1698 | smsc_ircc_stop_interrupts(self); | ||
1699 | free_irq(self->io.irq, self->netdev); | ||
1700 | disable_dma(self->io.dma); | ||
1701 | } | ||
1657 | self->io.suspended = 1; | 1702 | self->io.suspended = 1; |
1703 | rtnl_unlock(); | ||
1658 | } | 1704 | } |
1659 | 1705 | ||
1660 | return 0; | 1706 | return 0; |
@@ -1665,11 +1711,25 @@ static int smsc_ircc_resume(struct device *dev) | |||
1665 | struct smsc_ircc_cb *self = dev_get_drvdata(dev); | 1711 | struct smsc_ircc_cb *self = dev_get_drvdata(dev); |
1666 | 1712 | ||
1667 | if (self->io.suspended) { | 1713 | if (self->io.suspended) { |
1668 | 1714 | IRDA_DEBUG(1, "%s, Waking up\n", driver_name); | |
1669 | smsc_ircc_net_open(self->netdev); | 1715 | |
1716 | rtnl_lock(); | ||
1717 | smsc_ircc_init_chip(self); | ||
1718 | if (netif_running(self->netdev)) { | ||
1719 | if (smsc_ircc_request_irq(self)) { | ||
1720 | /* | ||
1721 | * Don't fail resume process, just kill this | ||
1722 | * network interface | ||
1723 | */ | ||
1724 | unregister_netdevice(self->netdev); | ||
1725 | } else { | ||
1726 | enable_dma(self->io.dma); | ||
1727 | smsc_ircc_start_interrupts(self); | ||
1728 | netif_device_attach(self->netdev); | ||
1729 | } | ||
1730 | } | ||
1670 | self->io.suspended = 0; | 1731 | self->io.suspended = 0; |
1671 | 1732 | rtnl_unlock(); | |
1672 | IRDA_MESSAGE("%s, Waking up\n", driver_name); | ||
1673 | } | 1733 | } |
1674 | return 0; | 1734 | return 0; |
1675 | } | 1735 | } |
@@ -1682,9 +1742,6 @@ static int smsc_ircc_resume(struct device *dev) | |||
1682 | */ | 1742 | */ |
1683 | static int __exit smsc_ircc_close(struct smsc_ircc_cb *self) | 1743 | static int __exit smsc_ircc_close(struct smsc_ircc_cb *self) |
1684 | { | 1744 | { |
1685 | int iobase; | ||
1686 | unsigned long flags; | ||
1687 | |||
1688 | IRDA_DEBUG(1, "%s\n", __FUNCTION__); | 1745 | IRDA_DEBUG(1, "%s\n", __FUNCTION__); |
1689 | 1746 | ||
1690 | IRDA_ASSERT(self != NULL, return -1;); | 1747 | IRDA_ASSERT(self != NULL, return -1;); |
@@ -1694,22 +1751,7 @@ static int __exit smsc_ircc_close(struct smsc_ircc_cb *self) | |||
1694 | /* Remove netdevice */ | 1751 | /* Remove netdevice */ |
1695 | unregister_netdev(self->netdev); | 1752 | unregister_netdev(self->netdev); |
1696 | 1753 | ||
1697 | /* Make sure the irq handler is not exectuting */ | 1754 | smsc_ircc_stop_interrupts(self); |
1698 | spin_lock_irqsave(&self->lock, flags); | ||
1699 | |||
1700 | /* Stop interrupts */ | ||
1701 | iobase = self->io.fir_base; | ||
1702 | register_bank(iobase, 0); | ||
1703 | outb(0, iobase + IRCC_IER); | ||
1704 | outb(IRCC_MASTER_RESET, iobase + IRCC_MASTER); | ||
1705 | outb(0x00, iobase + IRCC_MASTER); | ||
1706 | #if 0 | ||
1707 | /* Reset to SIR mode */ | ||
1708 | register_bank(iobase, 1); | ||
1709 | outb(IRCC_CFGA_IRDA_SIR_A|IRCC_CFGA_TX_POLARITY, iobase + IRCC_SCE_CFGA); | ||
1710 | outb(IRCC_CFGB_IR, iobase + IRCC_SCE_CFGB); | ||
1711 | #endif | ||
1712 | spin_unlock_irqrestore(&self->lock, flags); | ||
1713 | 1755 | ||
1714 | /* Release the PORTS that this driver is using */ | 1756 | /* Release the PORTS that this driver is using */ |
1715 | IRDA_DEBUG(0, "%s(), releasing 0x%03x\n", __FUNCTION__, | 1757 | IRDA_DEBUG(0, "%s(), releasing 0x%03x\n", __FUNCTION__, |
diff --git a/drivers/net/iseries_veth.c b/drivers/net/iseries_veth.c index 3d56cf5a4e23..d86d8f055a6c 100644 --- a/drivers/net/iseries_veth.c +++ b/drivers/net/iseries_veth.c | |||
@@ -70,13 +70,14 @@ | |||
70 | #include <linux/delay.h> | 70 | #include <linux/delay.h> |
71 | #include <linux/mm.h> | 71 | #include <linux/mm.h> |
72 | #include <linux/ethtool.h> | 72 | #include <linux/ethtool.h> |
73 | #include <asm/iSeries/mf.h> | 73 | |
74 | #include <asm/iSeries/iSeries_pci.h> | 74 | #include <asm/abs_addr.h> |
75 | #include <asm/iseries/mf.h> | ||
75 | #include <asm/uaccess.h> | 76 | #include <asm/uaccess.h> |
76 | 77 | ||
77 | #include <asm/iSeries/HvLpConfig.h> | 78 | #include <asm/iseries/hv_lp_config.h> |
78 | #include <asm/iSeries/HvTypes.h> | 79 | #include <asm/iseries/hv_types.h> |
79 | #include <asm/iSeries/HvLpEvent.h> | 80 | #include <asm/iseries/hv_lp_event.h> |
80 | #include <asm/iommu.h> | 81 | #include <asm/iommu.h> |
81 | #include <asm/vio.h> | 82 | #include <asm/vio.h> |
82 | 83 | ||
@@ -1397,13 +1398,13 @@ static inline void veth_build_dma_list(struct dma_chunk *list, | |||
1397 | * it just at the granularity of iSeries real->absolute | 1398 | * it just at the granularity of iSeries real->absolute |
1398 | * mapping? Indeed, given the way the allocator works, can we | 1399 | * mapping? Indeed, given the way the allocator works, can we |
1399 | * count on them being absolutely contiguous? */ | 1400 | * count on them being absolutely contiguous? */ |
1400 | list[0].addr = ISERIES_HV_ADDR(p); | 1401 | list[0].addr = iseries_hv_addr(p); |
1401 | list[0].size = min(length, | 1402 | list[0].size = min(length, |
1402 | PAGE_SIZE - ((unsigned long)p & ~PAGE_MASK)); | 1403 | PAGE_SIZE - ((unsigned long)p & ~PAGE_MASK)); |
1403 | 1404 | ||
1404 | done = list[0].size; | 1405 | done = list[0].size; |
1405 | while (done < length) { | 1406 | while (done < length) { |
1406 | list[i].addr = ISERIES_HV_ADDR(p + done); | 1407 | list[i].addr = iseries_hv_addr(p + done); |
1407 | list[i].size = min(length-done, PAGE_SIZE); | 1408 | list[i].size = min(length-done, PAGE_SIZE); |
1408 | done += list[i].size; | 1409 | done += list[i].size; |
1409 | i++; | 1410 | i++; |
@@ -1496,8 +1497,8 @@ static void veth_receive(struct veth_lpar_connection *cnx, | |||
1496 | cnx->dst_inst, | 1497 | cnx->dst_inst, |
1497 | HvLpDma_AddressType_RealAddress, | 1498 | HvLpDma_AddressType_RealAddress, |
1498 | HvLpDma_AddressType_TceIndex, | 1499 | HvLpDma_AddressType_TceIndex, |
1499 | ISERIES_HV_ADDR(&local_list), | 1500 | iseries_hv_addr(&local_list), |
1500 | ISERIES_HV_ADDR(&remote_list), | 1501 | iseries_hv_addr(&remote_list), |
1501 | length); | 1502 | length); |
1502 | if (rc != HvLpDma_Rc_Good) { | 1503 | if (rc != HvLpDma_Rc_Good) { |
1503 | dev_kfree_skb_irq(skb); | 1504 | dev_kfree_skb_irq(skb); |
@@ -1647,10 +1648,13 @@ static struct vio_device_id veth_device_table[] __devinitdata = { | |||
1647 | MODULE_DEVICE_TABLE(vio, veth_device_table); | 1648 | MODULE_DEVICE_TABLE(vio, veth_device_table); |
1648 | 1649 | ||
1649 | static struct vio_driver veth_driver = { | 1650 | static struct vio_driver veth_driver = { |
1650 | .name = DRV_NAME, | ||
1651 | .id_table = veth_device_table, | 1651 | .id_table = veth_device_table, |
1652 | .probe = veth_probe, | 1652 | .probe = veth_probe, |
1653 | .remove = veth_remove | 1653 | .remove = veth_remove, |
1654 | .driver = { | ||
1655 | .name = DRV_NAME, | ||
1656 | .owner = THIS_MODULE, | ||
1657 | } | ||
1654 | }; | 1658 | }; |
1655 | 1659 | ||
1656 | /* | 1660 | /* |
diff --git a/drivers/net/jazzsonic.c b/drivers/net/jazzsonic.c index 8423cb6875f0..a74a5cfaf5bc 100644 --- a/drivers/net/jazzsonic.c +++ b/drivers/net/jazzsonic.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <linux/netdevice.h> | 33 | #include <linux/netdevice.h> |
34 | #include <linux/etherdevice.h> | 34 | #include <linux/etherdevice.h> |
35 | #include <linux/skbuff.h> | 35 | #include <linux/skbuff.h> |
36 | #include <linux/device.h> | 36 | #include <linux/platform_device.h> |
37 | #include <linux/dma-mapping.h> | 37 | #include <linux/dma-mapping.h> |
38 | 38 | ||
39 | #include <asm/bootinfo.h> | 39 | #include <asm/bootinfo.h> |
diff --git a/drivers/net/mace.c b/drivers/net/mace.c index 09b1e7b364e5..2a5add257b8f 100644 --- a/drivers/net/mace.c +++ b/drivers/net/mace.c | |||
@@ -1016,6 +1016,7 @@ static struct of_device_id mace_match[] = | |||
1016 | }, | 1016 | }, |
1017 | {}, | 1017 | {}, |
1018 | }; | 1018 | }; |
1019 | MODULE_DEVICE_TABLE (of, mace_match); | ||
1019 | 1020 | ||
1020 | static struct macio_driver mace_driver = | 1021 | static struct macio_driver mace_driver = |
1021 | { | 1022 | { |
diff --git a/drivers/net/macsonic.c b/drivers/net/macsonic.c index 405e18365ede..e9c999d7eb39 100644 --- a/drivers/net/macsonic.c +++ b/drivers/net/macsonic.c | |||
@@ -47,7 +47,7 @@ | |||
47 | #include <linux/netdevice.h> | 47 | #include <linux/netdevice.h> |
48 | #include <linux/etherdevice.h> | 48 | #include <linux/etherdevice.h> |
49 | #include <linux/skbuff.h> | 49 | #include <linux/skbuff.h> |
50 | #include <linux/device.h> | 50 | #include <linux/platform_device.h> |
51 | #include <linux/dma-mapping.h> | 51 | #include <linux/dma-mapping.h> |
52 | 52 | ||
53 | #include <asm/bootinfo.h> | 53 | #include <asm/bootinfo.h> |
diff --git a/drivers/net/mipsnet.c b/drivers/net/mipsnet.c index f79f7ee72ab8..bbffb585b3b3 100644 --- a/drivers/net/mipsnet.c +++ b/drivers/net/mipsnet.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/etherdevice.h> | 14 | #include <linux/etherdevice.h> |
15 | #include <linux/netdevice.h> | 15 | #include <linux/netdevice.h> |
16 | #include <linux/platform_device.h> | ||
16 | #include <asm/io.h> | 17 | #include <asm/io.h> |
17 | #include <asm/mips-boards/simint.h> | 18 | #include <asm/mips-boards/simint.h> |
18 | 19 | ||
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index 25c9a99c377b..71f2c6705bc3 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
@@ -39,6 +39,8 @@ | |||
39 | #include <linux/bitops.h> | 39 | #include <linux/bitops.h> |
40 | #include <linux/delay.h> | 40 | #include <linux/delay.h> |
41 | #include <linux/ethtool.h> | 41 | #include <linux/ethtool.h> |
42 | #include <linux/platform_device.h> | ||
43 | |||
42 | #include <asm/io.h> | 44 | #include <asm/io.h> |
43 | #include <asm/types.h> | 45 | #include <asm/types.h> |
44 | #include <asm/pgtable.h> | 46 | #include <asm/pgtable.h> |
@@ -1533,6 +1535,9 @@ static int mv643xx_eth_probe(struct device *ddev) | |||
1533 | printk(KERN_NOTICE "%s: RX NAPI Enabled \n", dev->name); | 1535 | printk(KERN_NOTICE "%s: RX NAPI Enabled \n", dev->name); |
1534 | #endif | 1536 | #endif |
1535 | 1537 | ||
1538 | if (mp->tx_sram_size > 0) | ||
1539 | printk(KERN_NOTICE "%s: Using SRAM\n", dev->name); | ||
1540 | |||
1536 | return 0; | 1541 | return 0; |
1537 | 1542 | ||
1538 | out: | 1543 | out: |
diff --git a/drivers/net/skfp/smt.c b/drivers/net/skfp/smt.c index f17c05cbe44b..99a776a51fb5 100644 --- a/drivers/net/skfp/smt.c +++ b/drivers/net/skfp/smt.c | |||
@@ -1896,7 +1896,7 @@ void smt_swap_para(struct smt_header *sm, int len, int direction) | |||
1896 | 1896 | ||
1897 | static void smt_string_swap(char *data, const char *format, int len) | 1897 | static void smt_string_swap(char *data, const char *format, int len) |
1898 | { | 1898 | { |
1899 | const char *open_paren = 0 ; | 1899 | const char *open_paren = NULL ; |
1900 | int x ; | 1900 | int x ; |
1901 | 1901 | ||
1902 | while (len > 0 && *format) { | 1902 | while (len > 0 && *format) { |
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index c573bb351d4c..74d5f1a6fdea 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c | |||
@@ -77,7 +77,7 @@ static const char version[] = | |||
77 | #include <linux/errno.h> | 77 | #include <linux/errno.h> |
78 | #include <linux/ioport.h> | 78 | #include <linux/ioport.h> |
79 | #include <linux/crc32.h> | 79 | #include <linux/crc32.h> |
80 | #include <linux/device.h> | 80 | #include <linux/platform_device.h> |
81 | #include <linux/spinlock.h> | 81 | #include <linux/spinlock.h> |
82 | #include <linux/ethtool.h> | 82 | #include <linux/ethtool.h> |
83 | #include <linux/mii.h> | 83 | #include <linux/mii.h> |
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index ac9ce6509eee..817f200742c3 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h | |||
@@ -230,12 +230,12 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg) | |||
230 | #define SMC_CAN_USE_16BIT 1 | 230 | #define SMC_CAN_USE_16BIT 1 |
231 | #define SMC_CAN_USE_32BIT 0 | 231 | #define SMC_CAN_USE_32BIT 0 |
232 | 232 | ||
233 | #define SMC_inb(a, r) inb((a) + (r) - 0xa0000000) | 233 | #define SMC_inb(a, r) inb((u32)a) + (r)) |
234 | #define SMC_inw(a, r) inw((a) + (r) - 0xa0000000) | 234 | #define SMC_inw(a, r) inw(((u32)a) + (r)) |
235 | #define SMC_outb(v, a, r) outb(v, (a) + (r) - 0xa0000000) | 235 | #define SMC_outb(v, a, r) outb(v, ((u32)a) + (r)) |
236 | #define SMC_outw(v, a, r) outw(v, (a) + (r) - 0xa0000000) | 236 | #define SMC_outw(v, a, r) outw(v, ((u32)a) + (r)) |
237 | #define SMC_insw(a, r, p, l) insw((a) + (r) - 0xa0000000, p, l) | 237 | #define SMC_insw(a, r, p, l) insw(((u32)a) + (r), p, l) |
238 | #define SMC_outsw(a, r, p, l) outsw((a) + (r) - 0xa0000000, p, l) | 238 | #define SMC_outsw(a, r, p, l) outsw(((u32)a) + (r), p, l) |
239 | 239 | ||
240 | #define set_irq_type(irq, type) do {} while(0) | 240 | #define set_irq_type(irq, type) do {} while(0) |
241 | 241 | ||
diff --git a/drivers/net/tokenring/proteon.c b/drivers/net/tokenring/proteon.c index eb1423ede75c..d04c918ebef8 100644 --- a/drivers/net/tokenring/proteon.c +++ b/drivers/net/tokenring/proteon.c | |||
@@ -29,6 +29,7 @@ static const char version[] = "proteon.c: v1.00 02/01/2003 by Jochen Friedrich\n | |||
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/netdevice.h> | 30 | #include <linux/netdevice.h> |
31 | #include <linux/trdevice.h> | 31 | #include <linux/trdevice.h> |
32 | #include <linux/platform_device.h> | ||
32 | 33 | ||
33 | #include <asm/system.h> | 34 | #include <asm/system.h> |
34 | #include <asm/io.h> | 35 | #include <asm/io.h> |
diff --git a/drivers/net/tokenring/skisa.c b/drivers/net/tokenring/skisa.c index 3c7c66204f74..72cf708396be 100644 --- a/drivers/net/tokenring/skisa.c +++ b/drivers/net/tokenring/skisa.c | |||
@@ -36,6 +36,7 @@ static const char version[] = "skisa.c: v1.03 09/12/2002 by Jochen Friedrich\n"; | |||
36 | #include <linux/init.h> | 36 | #include <linux/init.h> |
37 | #include <linux/netdevice.h> | 37 | #include <linux/netdevice.h> |
38 | #include <linux/trdevice.h> | 38 | #include <linux/trdevice.h> |
39 | #include <linux/platform_device.h> | ||
39 | 40 | ||
40 | #include <asm/system.h> | 41 | #include <asm/system.h> |
41 | #include <asm/io.h> | 42 | #include <asm/io.h> |
diff --git a/drivers/net/wireless/prism54/islpci_mgt.c b/drivers/net/wireless/prism54/islpci_mgt.c index 4937a5ad4b2c..6a60c5970cb5 100644 --- a/drivers/net/wireless/prism54/islpci_mgt.c +++ b/drivers/net/wireless/prism54/islpci_mgt.c | |||
@@ -137,7 +137,7 @@ islpci_mgmt_rx_fill(struct net_device *ndev) | |||
137 | PCI_DMA_FROMDEVICE); | 137 | PCI_DMA_FROMDEVICE); |
138 | if (!buf->pci_addr) { | 138 | if (!buf->pci_addr) { |
139 | printk(KERN_WARNING | 139 | printk(KERN_WARNING |
140 | "Failed to make memory DMA'able\n."); | 140 | "Failed to make memory DMA'able.\n"); |
141 | return -ENOMEM; | 141 | return -ENOMEM; |
142 | } | 142 | } |
143 | } | 143 | } |