diff options
author | Paul Mackerras <paulus@samba.org> | 2006-06-01 05:05:23 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-06-01 05:05:23 -0400 |
commit | c029cc66cb3d83f70c02e0c182f0eed1419f8020 (patch) | |
tree | b9ed887a0e6434fedebcbf90b3d2ba1aeff68a01 /drivers/net | |
parent | 0a9cb46a73abd6c45e7c986bec984eed60c417b6 (diff) | |
parent | ba8f5baba79da8eb502f8534c3a8ecb64aceb790 (diff) |
Merge branch 'merge'
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/bnx2.c | 20 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 10 | ||||
-rw-r--r-- | drivers/net/forcedeth.c | 72 | ||||
-rw-r--r-- | drivers/net/irda/Kconfig | 20 | ||||
-rw-r--r-- | drivers/net/pcmcia/axnet_cs.c | 13 | ||||
-rw-r--r-- | drivers/net/pcnet32.c | 2 | ||||
-rw-r--r-- | drivers/net/skge.c | 8 | ||||
-rw-r--r-- | drivers/net/sky2.c | 73 | ||||
-rw-r--r-- | drivers/net/sky2.h | 2 | ||||
-rw-r--r-- | drivers/net/tg3.c | 8 | ||||
-rw-r--r-- | drivers/net/tulip/winbond-840.c | 4 | ||||
-rw-r--r-- | drivers/net/via-rhine.c | 34 | ||||
-rw-r--r-- | drivers/net/wireless/arlan-main.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_main.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/wavelan.c | 2 |
16 files changed, 107 insertions, 175 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 5ca99e26660a..54161aef3cac 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -55,8 +55,8 @@ | |||
55 | 55 | ||
56 | #define DRV_MODULE_NAME "bnx2" | 56 | #define DRV_MODULE_NAME "bnx2" |
57 | #define PFX DRV_MODULE_NAME ": " | 57 | #define PFX DRV_MODULE_NAME ": " |
58 | #define DRV_MODULE_VERSION "1.4.39" | 58 | #define DRV_MODULE_VERSION "1.4.40" |
59 | #define DRV_MODULE_RELDATE "March 22, 2006" | 59 | #define DRV_MODULE_RELDATE "May 22, 2006" |
60 | 60 | ||
61 | #define RUN_AT(x) (jiffies + (x)) | 61 | #define RUN_AT(x) (jiffies + (x)) |
62 | 62 | ||
@@ -2945,7 +2945,7 @@ bnx2_nvram_write(struct bnx2 *bp, u32 offset, u8 *data_buf, | |||
2945 | int buf_size) | 2945 | int buf_size) |
2946 | { | 2946 | { |
2947 | u32 written, offset32, len32; | 2947 | u32 written, offset32, len32; |
2948 | u8 *buf, start[4], end[4]; | 2948 | u8 *buf, start[4], end[4], *flash_buffer = NULL; |
2949 | int rc = 0; | 2949 | int rc = 0; |
2950 | int align_start, align_end; | 2950 | int align_start, align_end; |
2951 | 2951 | ||
@@ -2985,12 +2985,19 @@ bnx2_nvram_write(struct bnx2 *bp, u32 offset, u8 *data_buf, | |||
2985 | memcpy(buf + align_start, data_buf, buf_size); | 2985 | memcpy(buf + align_start, data_buf, buf_size); |
2986 | } | 2986 | } |
2987 | 2987 | ||
2988 | if (bp->flash_info->buffered == 0) { | ||
2989 | flash_buffer = kmalloc(264, GFP_KERNEL); | ||
2990 | if (flash_buffer == NULL) { | ||
2991 | rc = -ENOMEM; | ||
2992 | goto nvram_write_end; | ||
2993 | } | ||
2994 | } | ||
2995 | |||
2988 | written = 0; | 2996 | written = 0; |
2989 | while ((written < len32) && (rc == 0)) { | 2997 | while ((written < len32) && (rc == 0)) { |
2990 | u32 page_start, page_end, data_start, data_end; | 2998 | u32 page_start, page_end, data_start, data_end; |
2991 | u32 addr, cmd_flags; | 2999 | u32 addr, cmd_flags; |
2992 | int i; | 3000 | int i; |
2993 | u8 flash_buffer[264]; | ||
2994 | 3001 | ||
2995 | /* Find the page_start addr */ | 3002 | /* Find the page_start addr */ |
2996 | page_start = offset32 + written; | 3003 | page_start = offset32 + written; |
@@ -3061,7 +3068,7 @@ bnx2_nvram_write(struct bnx2 *bp, u32 offset, u8 *data_buf, | |||
3061 | } | 3068 | } |
3062 | 3069 | ||
3063 | /* Loop to write the new data from data_start to data_end */ | 3070 | /* Loop to write the new data from data_start to data_end */ |
3064 | for (addr = data_start; addr < data_end; addr += 4, i++) { | 3071 | for (addr = data_start; addr < data_end; addr += 4, i += 4) { |
3065 | if ((addr == page_end - 4) || | 3072 | if ((addr == page_end - 4) || |
3066 | ((bp->flash_info->buffered) && | 3073 | ((bp->flash_info->buffered) && |
3067 | (addr == data_end - 4))) { | 3074 | (addr == data_end - 4))) { |
@@ -3109,6 +3116,9 @@ bnx2_nvram_write(struct bnx2 *bp, u32 offset, u8 *data_buf, | |||
3109 | } | 3116 | } |
3110 | 3117 | ||
3111 | nvram_write_end: | 3118 | nvram_write_end: |
3119 | if (bp->flash_info->buffered == 0) | ||
3120 | kfree(flash_buffer); | ||
3121 | |||
3112 | if (align_start || align_end) | 3122 | if (align_start || align_end) |
3113 | kfree(buf); | 3123 | kfree(buf); |
3114 | return rc; | 3124 | return rc; |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index c99e87838f92..ed15fcaedaf9 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -220,6 +220,7 @@ static void e1000_restore_vlan(struct e1000_adapter *adapter); | |||
220 | static int e1000_suspend(struct pci_dev *pdev, pm_message_t state); | 220 | static int e1000_suspend(struct pci_dev *pdev, pm_message_t state); |
221 | static int e1000_resume(struct pci_dev *pdev); | 221 | static int e1000_resume(struct pci_dev *pdev); |
222 | #endif | 222 | #endif |
223 | static void e1000_shutdown(struct pci_dev *pdev); | ||
223 | 224 | ||
224 | #ifdef CONFIG_NET_POLL_CONTROLLER | 225 | #ifdef CONFIG_NET_POLL_CONTROLLER |
225 | /* for netdump / net console */ | 226 | /* for netdump / net console */ |
@@ -235,8 +236,9 @@ static struct pci_driver e1000_driver = { | |||
235 | /* Power Managment Hooks */ | 236 | /* Power Managment Hooks */ |
236 | #ifdef CONFIG_PM | 237 | #ifdef CONFIG_PM |
237 | .suspend = e1000_suspend, | 238 | .suspend = e1000_suspend, |
238 | .resume = e1000_resume | 239 | .resume = e1000_resume, |
239 | #endif | 240 | #endif |
241 | .shutdown = e1000_shutdown | ||
240 | }; | 242 | }; |
241 | 243 | ||
242 | MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>"); | 244 | MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>"); |
@@ -4611,6 +4613,12 @@ e1000_resume(struct pci_dev *pdev) | |||
4611 | return 0; | 4613 | return 0; |
4612 | } | 4614 | } |
4613 | #endif | 4615 | #endif |
4616 | |||
4617 | static void e1000_shutdown(struct pci_dev *pdev) | ||
4618 | { | ||
4619 | e1000_suspend(pdev, PMSG_SUSPEND); | ||
4620 | } | ||
4621 | |||
4614 | #ifdef CONFIG_NET_POLL_CONTROLLER | 4622 | #ifdef CONFIG_NET_POLL_CONTROLLER |
4615 | /* | 4623 | /* |
4616 | * Polling 'interrupt' - used by things like netconsole to send skbs | 4624 | * Polling 'interrupt' - used by things like netconsole to send skbs |
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index f7235c9bc421..705e1229d89d 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -2891,78 +2891,6 @@ static int nv_open(struct net_device *dev) | |||
2891 | goto out_drain; | 2891 | goto out_drain; |
2892 | } | 2892 | } |
2893 | 2893 | ||
2894 | if (np->msi_flags & NV_MSI_X_CAPABLE) { | ||
2895 | for (i = 0; i < (np->msi_flags & NV_MSI_X_VECTORS_MASK); i++) { | ||
2896 | np->msi_x_entry[i].entry = i; | ||
2897 | } | ||
2898 | if ((ret = pci_enable_msix(np->pci_dev, np->msi_x_entry, (np->msi_flags & NV_MSI_X_VECTORS_MASK))) == 0) { | ||
2899 | np->msi_flags |= NV_MSI_X_ENABLED; | ||
2900 | if (optimization_mode == NV_OPTIMIZATION_MODE_THROUGHPUT) { | ||
2901 | /* Request irq for rx handling */ | ||
2902 | if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector, &nv_nic_irq_rx, SA_SHIRQ, dev->name, dev) != 0) { | ||
2903 | printk(KERN_INFO "forcedeth: request_irq failed for rx %d\n", ret); | ||
2904 | pci_disable_msix(np->pci_dev); | ||
2905 | np->msi_flags &= ~NV_MSI_X_ENABLED; | ||
2906 | goto out_drain; | ||
2907 | } | ||
2908 | /* Request irq for tx handling */ | ||
2909 | if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector, &nv_nic_irq_tx, SA_SHIRQ, dev->name, dev) != 0) { | ||
2910 | printk(KERN_INFO "forcedeth: request_irq failed for tx %d\n", ret); | ||
2911 | pci_disable_msix(np->pci_dev); | ||
2912 | np->msi_flags &= ~NV_MSI_X_ENABLED; | ||
2913 | goto out_drain; | ||
2914 | } | ||
2915 | /* Request irq for link and timer handling */ | ||
2916 | if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector, &nv_nic_irq_other, SA_SHIRQ, dev->name, dev) != 0) { | ||
2917 | printk(KERN_INFO "forcedeth: request_irq failed for link %d\n", ret); | ||
2918 | pci_disable_msix(np->pci_dev); | ||
2919 | np->msi_flags &= ~NV_MSI_X_ENABLED; | ||
2920 | goto out_drain; | ||
2921 | } | ||
2922 | |||
2923 | /* map interrupts to their respective vector */ | ||
2924 | writel(0, base + NvRegMSIXMap0); | ||
2925 | writel(0, base + NvRegMSIXMap1); | ||
2926 | set_msix_vector_map(dev, NV_MSI_X_VECTOR_RX, NVREG_IRQ_RX_ALL); | ||
2927 | set_msix_vector_map(dev, NV_MSI_X_VECTOR_TX, NVREG_IRQ_TX_ALL); | ||
2928 | set_msix_vector_map(dev, NV_MSI_X_VECTOR_OTHER, NVREG_IRQ_OTHER); | ||
2929 | } else { | ||
2930 | /* Request irq for all interrupts */ | ||
2931 | if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector, &nv_nic_irq, SA_SHIRQ, dev->name, dev) != 0) { | ||
2932 | printk(KERN_INFO "forcedeth: request_irq failed %d\n", ret); | ||
2933 | pci_disable_msix(np->pci_dev); | ||
2934 | np->msi_flags &= ~NV_MSI_X_ENABLED; | ||
2935 | goto out_drain; | ||
2936 | } | ||
2937 | |||
2938 | /* map interrupts to vector 0 */ | ||
2939 | writel(0, base + NvRegMSIXMap0); | ||
2940 | writel(0, base + NvRegMSIXMap1); | ||
2941 | } | ||
2942 | } | ||
2943 | } | ||
2944 | if (ret != 0 && np->msi_flags & NV_MSI_CAPABLE) { | ||
2945 | if ((ret = pci_enable_msi(np->pci_dev)) == 0) { | ||
2946 | np->msi_flags |= NV_MSI_ENABLED; | ||
2947 | if (request_irq(np->pci_dev->irq, &nv_nic_irq, SA_SHIRQ, dev->name, dev) != 0) { | ||
2948 | printk(KERN_INFO "forcedeth: request_irq failed %d\n", ret); | ||
2949 | pci_disable_msi(np->pci_dev); | ||
2950 | np->msi_flags &= ~NV_MSI_ENABLED; | ||
2951 | goto out_drain; | ||
2952 | } | ||
2953 | |||
2954 | /* map interrupts to vector 0 */ | ||
2955 | writel(0, base + NvRegMSIMap0); | ||
2956 | writel(0, base + NvRegMSIMap1); | ||
2957 | /* enable msi vector 0 */ | ||
2958 | writel(NVREG_MSI_VECTOR_0_ENABLED, base + NvRegMSIIrqMask); | ||
2959 | } | ||
2960 | } | ||
2961 | if (ret != 0) { | ||
2962 | if (request_irq(np->pci_dev->irq, &nv_nic_irq, SA_SHIRQ, dev->name, dev) != 0) | ||
2963 | goto out_drain; | ||
2964 | } | ||
2965 | |||
2966 | /* ask for interrupts */ | 2894 | /* ask for interrupts */ |
2967 | nv_enable_hw_interrupts(dev, np->irqmask); | 2895 | nv_enable_hw_interrupts(dev, np->irqmask); |
2968 | 2896 | ||
diff --git a/drivers/net/irda/Kconfig b/drivers/net/irda/Kconfig index 5e6d00752990..cff8598aa800 100644 --- a/drivers/net/irda/Kconfig +++ b/drivers/net/irda/Kconfig | |||
@@ -33,7 +33,7 @@ config DONGLE | |||
33 | 33 | ||
34 | config ESI_DONGLE | 34 | config ESI_DONGLE |
35 | tristate "ESI JetEye PC dongle" | 35 | tristate "ESI JetEye PC dongle" |
36 | depends on DONGLE && IRDA | 36 | depends on IRTTY_SIR && DONGLE && IRDA |
37 | help | 37 | help |
38 | Say Y here if you want to build support for the Extended Systems | 38 | Say Y here if you want to build support for the Extended Systems |
39 | JetEye PC dongle. To compile it as a module, choose M here. The ESI | 39 | JetEye PC dongle. To compile it as a module, choose M here. The ESI |
@@ -44,7 +44,7 @@ config ESI_DONGLE | |||
44 | 44 | ||
45 | config ACTISYS_DONGLE | 45 | config ACTISYS_DONGLE |
46 | tristate "ACTiSYS IR-220L and IR220L+ dongle" | 46 | tristate "ACTiSYS IR-220L and IR220L+ dongle" |
47 | depends on DONGLE && IRDA | 47 | depends on IRTTY_SIR && DONGLE && IRDA |
48 | help | 48 | help |
49 | Say Y here if you want to build support for the ACTiSYS IR-220L and | 49 | Say Y here if you want to build support for the ACTiSYS IR-220L and |
50 | IR220L+ dongles. To compile it as a module, choose M here. The | 50 | IR220L+ dongles. To compile it as a module, choose M here. The |
@@ -55,7 +55,7 @@ config ACTISYS_DONGLE | |||
55 | 55 | ||
56 | config TEKRAM_DONGLE | 56 | config TEKRAM_DONGLE |
57 | tristate "Tekram IrMate 210B dongle" | 57 | tristate "Tekram IrMate 210B dongle" |
58 | depends on DONGLE && IRDA | 58 | depends on IRTTY_SIR && DONGLE && IRDA |
59 | help | 59 | help |
60 | Say Y here if you want to build support for the Tekram IrMate 210B | 60 | Say Y here if you want to build support for the Tekram IrMate 210B |
61 | dongle. To compile it as a module, choose M here. The Tekram dongle | 61 | dongle. To compile it as a module, choose M here. The Tekram dongle |
@@ -66,7 +66,7 @@ config TEKRAM_DONGLE | |||
66 | 66 | ||
67 | config TOIM3232_DONGLE | 67 | config TOIM3232_DONGLE |
68 | tristate "TOIM3232 IrDa dongle" | 68 | tristate "TOIM3232 IrDa dongle" |
69 | depends on DONGLE && IRDA | 69 | depends on IRTTY_SIR && DONGLE && IRDA |
70 | help | 70 | help |
71 | Say Y here if you want to build support for the Vishay/Temic | 71 | Say Y here if you want to build support for the Vishay/Temic |
72 | TOIM3232 and TOIM4232 based dongles. | 72 | TOIM3232 and TOIM4232 based dongles. |
@@ -74,7 +74,7 @@ config TOIM3232_DONGLE | |||
74 | 74 | ||
75 | config LITELINK_DONGLE | 75 | config LITELINK_DONGLE |
76 | tristate "Parallax LiteLink dongle" | 76 | tristate "Parallax LiteLink dongle" |
77 | depends on DONGLE && IRDA | 77 | depends on IRTTY_SIR && DONGLE && IRDA |
78 | help | 78 | help |
79 | Say Y here if you want to build support for the Parallax Litelink | 79 | Say Y here if you want to build support for the Parallax Litelink |
80 | dongle. To compile it as a module, choose M here. The Parallax | 80 | dongle. To compile it as a module, choose M here. The Parallax |
@@ -85,7 +85,7 @@ config LITELINK_DONGLE | |||
85 | 85 | ||
86 | config MA600_DONGLE | 86 | config MA600_DONGLE |
87 | tristate "Mobile Action MA600 dongle" | 87 | tristate "Mobile Action MA600 dongle" |
88 | depends on DONGLE && IRDA && EXPERIMENTAL | 88 | depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL |
89 | help | 89 | help |
90 | Say Y here if you want to build support for the Mobile Action MA600 | 90 | Say Y here if you want to build support for the Mobile Action MA600 |
91 | dongle. To compile it as a module, choose M here. The MA600 dongle | 91 | dongle. To compile it as a module, choose M here. The MA600 dongle |
@@ -98,7 +98,7 @@ config MA600_DONGLE | |||
98 | 98 | ||
99 | config GIRBIL_DONGLE | 99 | config GIRBIL_DONGLE |
100 | tristate "Greenwich GIrBIL dongle" | 100 | tristate "Greenwich GIrBIL dongle" |
101 | depends on DONGLE && IRDA && EXPERIMENTAL | 101 | depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL |
102 | help | 102 | help |
103 | Say Y here if you want to build support for the Greenwich GIrBIL | 103 | Say Y here if you want to build support for the Greenwich GIrBIL |
104 | dongle. If you want to compile it as a module, choose M here. | 104 | dongle. If you want to compile it as a module, choose M here. |
@@ -109,7 +109,7 @@ config GIRBIL_DONGLE | |||
109 | 109 | ||
110 | config MCP2120_DONGLE | 110 | config MCP2120_DONGLE |
111 | tristate "Microchip MCP2120" | 111 | tristate "Microchip MCP2120" |
112 | depends on DONGLE && IRDA && EXPERIMENTAL | 112 | depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL |
113 | help | 113 | help |
114 | Say Y here if you want to build support for the Microchip MCP2120 | 114 | Say Y here if you want to build support for the Microchip MCP2120 |
115 | dongle. If you want to compile it as a module, choose M here. | 115 | dongle. If you want to compile it as a module, choose M here. |
@@ -123,7 +123,7 @@ config MCP2120_DONGLE | |||
123 | 123 | ||
124 | config OLD_BELKIN_DONGLE | 124 | config OLD_BELKIN_DONGLE |
125 | tristate "Old Belkin dongle" | 125 | tristate "Old Belkin dongle" |
126 | depends on DONGLE && IRDA && EXPERIMENTAL | 126 | depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL |
127 | help | 127 | help |
128 | Say Y here if you want to build support for the Adaptec Airport 1000 | 128 | Say Y here if you want to build support for the Adaptec Airport 1000 |
129 | and 2000 dongles. If you want to compile it as a module, choose | 129 | and 2000 dongles. If you want to compile it as a module, choose |
@@ -132,7 +132,7 @@ config OLD_BELKIN_DONGLE | |||
132 | 132 | ||
133 | config ACT200L_DONGLE | 133 | config ACT200L_DONGLE |
134 | tristate "ACTiSYS IR-200L dongle" | 134 | tristate "ACTiSYS IR-200L dongle" |
135 | depends on DONGLE && IRDA && EXPERIMENTAL | 135 | depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL |
136 | help | 136 | help |
137 | Say Y here if you want to build support for the ACTiSYS IR-200L | 137 | Say Y here if you want to build support for the ACTiSYS IR-200L |
138 | dongle. If you want to compile it as a module, choose M here. | 138 | dongle. If you want to compile it as a module, choose M here. |
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index 448a09488529..2ea66aca648b 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
@@ -1691,17 +1691,6 @@ static void do_set_multicast_list(struct net_device *dev) | |||
1691 | memset(ei_local->mcfilter, 0xFF, 8); | 1691 | memset(ei_local->mcfilter, 0xFF, 8); |
1692 | } | 1692 | } |
1693 | 1693 | ||
1694 | /* | ||
1695 | * DP8390 manuals don't specify any magic sequence for altering | ||
1696 | * the multicast regs on an already running card. To be safe, we | ||
1697 | * ensure multicast mode is off prior to loading up the new hash | ||
1698 | * table. If this proves to be not enough, we can always resort | ||
1699 | * to stopping the NIC, loading the table and then restarting. | ||
1700 | */ | ||
1701 | |||
1702 | if (netif_running(dev)) | ||
1703 | outb_p(E8390_RXCONFIG, e8390_base + EN0_RXCR); | ||
1704 | |||
1705 | outb_p(E8390_NODMA + E8390_PAGE1, e8390_base + E8390_CMD); | 1694 | outb_p(E8390_NODMA + E8390_PAGE1, e8390_base + E8390_CMD); |
1706 | for(i = 0; i < 8; i++) | 1695 | for(i = 0; i < 8; i++) |
1707 | { | 1696 | { |
@@ -1715,6 +1704,8 @@ static void do_set_multicast_list(struct net_device *dev) | |||
1715 | outb_p(E8390_RXCONFIG | 0x48, e8390_base + EN0_RXCR); | 1704 | outb_p(E8390_RXCONFIG | 0x48, e8390_base + EN0_RXCR); |
1716 | else | 1705 | else |
1717 | outb_p(E8390_RXCONFIG | 0x40, e8390_base + EN0_RXCR); | 1706 | outb_p(E8390_RXCONFIG | 0x40, e8390_base + EN0_RXCR); |
1707 | |||
1708 | outb_p(E8390_NODMA+E8390_PAGE0+E8390_START, e8390_base+E8390_CMD); | ||
1718 | } | 1709 | } |
1719 | 1710 | ||
1720 | /* | 1711 | /* |
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c index 07c31f19c6ba..fc08c4af506c 100644 --- a/drivers/net/pcnet32.c +++ b/drivers/net/pcnet32.c | |||
@@ -1774,8 +1774,6 @@ static int pcnet32_open(struct net_device *dev) | |||
1774 | lp->rx_dma_addr[i] = 0; | 1774 | lp->rx_dma_addr[i] = 0; |
1775 | } | 1775 | } |
1776 | 1776 | ||
1777 | pcnet32_free_ring(dev); | ||
1778 | |||
1779 | /* | 1777 | /* |
1780 | * Switch back to 16bit mode to avoid problems with dumb | 1778 | * Switch back to 16bit mode to avoid problems with dumb |
1781 | * DOS packet driver after a warm reboot | 1779 | * DOS packet driver after a warm reboot |
diff --git a/drivers/net/skge.c b/drivers/net/skge.c index a70c2b0cc104..5ca5a1b546a1 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c | |||
@@ -78,8 +78,7 @@ static const struct pci_device_id skge_id_table[] = { | |||
78 | { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_GE) }, | 78 | { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_GE) }, |
79 | { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_YU) }, | 79 | { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_YU) }, |
80 | { PCI_DEVICE(PCI_VENDOR_ID_DLINK, PCI_DEVICE_ID_DLINK_DGE510T), }, | 80 | { PCI_DEVICE(PCI_VENDOR_ID_DLINK, PCI_DEVICE_ID_DLINK_DGE510T), }, |
81 | { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4b00) }, | 81 | { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4b01) }, /* DGE-530T */ |
82 | { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4b01) }, | ||
83 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4320) }, | 82 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4320) }, |
84 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x5005) }, /* Belkin */ | 83 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x5005) }, /* Belkin */ |
85 | { PCI_DEVICE(PCI_VENDOR_ID_CNET, PCI_DEVICE_ID_CNET_GIGACARD) }, | 84 | { PCI_DEVICE(PCI_VENDOR_ID_CNET, PCI_DEVICE_ID_CNET_GIGACARD) }, |
@@ -402,7 +401,7 @@ static int skge_set_ring_param(struct net_device *dev, | |||
402 | int err; | 401 | int err; |
403 | 402 | ||
404 | if (p->rx_pending == 0 || p->rx_pending > MAX_RX_RING_SIZE || | 403 | if (p->rx_pending == 0 || p->rx_pending > MAX_RX_RING_SIZE || |
405 | p->tx_pending == 0 || p->tx_pending > MAX_TX_RING_SIZE) | 404 | p->tx_pending < MAX_SKB_FRAGS+1 || p->tx_pending > MAX_TX_RING_SIZE) |
406 | return -EINVAL; | 405 | return -EINVAL; |
407 | 406 | ||
408 | skge->rx_ring.count = p->rx_pending; | 407 | skge->rx_ring.count = p->rx_pending; |
@@ -2717,8 +2716,7 @@ static int skge_poll(struct net_device *dev, int *budget) | |||
2717 | if (control & BMU_OWN) | 2716 | if (control & BMU_OWN) |
2718 | break; | 2717 | break; |
2719 | 2718 | ||
2720 | skb = skge_rx_get(skge, e, control, rd->status, | 2719 | skb = skge_rx_get(skge, e, control, rd->status, rd->csum2); |
2721 | le16_to_cpu(rd->csum2)); | ||
2722 | if (likely(skb)) { | 2720 | if (likely(skb)) { |
2723 | dev->last_rx = jiffies; | 2721 | dev->last_rx = jiffies; |
2724 | netif_receive_skb(skb); | 2722 | netif_receive_skb(skb); |
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 62be6d99d05c..959109609d85 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -51,7 +51,7 @@ | |||
51 | #include "sky2.h" | 51 | #include "sky2.h" |
52 | 52 | ||
53 | #define DRV_NAME "sky2" | 53 | #define DRV_NAME "sky2" |
54 | #define DRV_VERSION "1.3" | 54 | #define DRV_VERSION "1.4" |
55 | #define PFX DRV_NAME " " | 55 | #define PFX DRV_NAME " " |
56 | 56 | ||
57 | /* | 57 | /* |
@@ -105,6 +105,7 @@ MODULE_PARM_DESC(idle_timeout, "Idle timeout workaround for lost interrupts (ms) | |||
105 | static const struct pci_device_id sky2_id_table[] = { | 105 | static const struct pci_device_id sky2_id_table[] = { |
106 | { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9000) }, | 106 | { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9000) }, |
107 | { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9E00) }, | 107 | { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9E00) }, |
108 | { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4b00) }, /* DGE-560T */ | ||
108 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4340) }, | 109 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4340) }, |
109 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4341) }, | 110 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4341) }, |
110 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4342) }, | 111 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4342) }, |
@@ -235,6 +236,7 @@ static int sky2_set_power_state(struct sky2_hw *hw, pci_power_t state) | |||
235 | } | 236 | } |
236 | 237 | ||
237 | if (hw->chip_id == CHIP_ID_YUKON_EC_U) { | 238 | if (hw->chip_id == CHIP_ID_YUKON_EC_U) { |
239 | sky2_write16(hw, B0_CTST, Y2_HW_WOL_ON); | ||
238 | sky2_pci_write32(hw, PCI_DEV_REG3, 0); | 240 | sky2_pci_write32(hw, PCI_DEV_REG3, 0); |
239 | reg1 = sky2_pci_read32(hw, PCI_DEV_REG4); | 241 | reg1 = sky2_pci_read32(hw, PCI_DEV_REG4); |
240 | reg1 &= P_ASPM_CONTROL_MSK; | 242 | reg1 &= P_ASPM_CONTROL_MSK; |
@@ -306,7 +308,7 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port) | |||
306 | u16 ctrl, ct1000, adv, pg, ledctrl, ledover; | 308 | u16 ctrl, ct1000, adv, pg, ledctrl, ledover; |
307 | 309 | ||
308 | if (sky2->autoneg == AUTONEG_ENABLE && | 310 | if (sky2->autoneg == AUTONEG_ENABLE && |
309 | (hw->chip_id != CHIP_ID_YUKON_XL || hw->chip_id == CHIP_ID_YUKON_EC_U)) { | 311 | !(hw->chip_id == CHIP_ID_YUKON_XL || hw->chip_id == CHIP_ID_YUKON_EC_U)) { |
310 | u16 ectrl = gm_phy_read(hw, port, PHY_MARV_EXT_CTRL); | 312 | u16 ectrl = gm_phy_read(hw, port, PHY_MARV_EXT_CTRL); |
311 | 313 | ||
312 | ectrl &= ~(PHY_M_EC_M_DSC_MSK | PHY_M_EC_S_DSC_MSK | | 314 | ectrl &= ~(PHY_M_EC_M_DSC_MSK | PHY_M_EC_S_DSC_MSK | |
@@ -977,6 +979,7 @@ static int sky2_rx_start(struct sky2_port *sky2) | |||
977 | struct sky2_hw *hw = sky2->hw; | 979 | struct sky2_hw *hw = sky2->hw; |
978 | unsigned rxq = rxqaddr[sky2->port]; | 980 | unsigned rxq = rxqaddr[sky2->port]; |
979 | int i; | 981 | int i; |
982 | unsigned thresh; | ||
980 | 983 | ||
981 | sky2->rx_put = sky2->rx_next = 0; | 984 | sky2->rx_put = sky2->rx_next = 0; |
982 | sky2_qset(hw, rxq); | 985 | sky2_qset(hw, rxq); |
@@ -1001,9 +1004,21 @@ static int sky2_rx_start(struct sky2_port *sky2) | |||
1001 | sky2_rx_add(sky2, re->mapaddr); | 1004 | sky2_rx_add(sky2, re->mapaddr); |
1002 | } | 1005 | } |
1003 | 1006 | ||
1004 | /* Truncate oversize frames */ | 1007 | |
1005 | sky2_write16(hw, SK_REG(sky2->port, RX_GMF_TR_THR), sky2->rx_bufsize - 8); | 1008 | /* |
1006 | sky2_write32(hw, SK_REG(sky2->port, RX_GMF_CTRL_T), RX_TRUNC_ON); | 1009 | * The receiver hangs if it receives frames larger than the |
1010 | * packet buffer. As a workaround, truncate oversize frames, but | ||
1011 | * the register is limited to 9 bits, so if you do frames > 2052 | ||
1012 | * you better get the MTU right! | ||
1013 | */ | ||
1014 | thresh = (sky2->rx_bufsize - 8) / sizeof(u32); | ||
1015 | if (thresh > 0x1ff) | ||
1016 | sky2_write32(hw, SK_REG(sky2->port, RX_GMF_CTRL_T), RX_TRUNC_OFF); | ||
1017 | else { | ||
1018 | sky2_write16(hw, SK_REG(sky2->port, RX_GMF_TR_THR), thresh); | ||
1019 | sky2_write32(hw, SK_REG(sky2->port, RX_GMF_CTRL_T), RX_TRUNC_ON); | ||
1020 | } | ||
1021 | |||
1007 | 1022 | ||
1008 | /* Tell chip about available buffers */ | 1023 | /* Tell chip about available buffers */ |
1009 | sky2_write16(hw, Y2_QADDR(rxq, PREF_UNIT_PUT_IDX), sky2->rx_put); | 1024 | sky2_write16(hw, Y2_QADDR(rxq, PREF_UNIT_PUT_IDX), sky2->rx_put); |
@@ -1020,19 +1035,26 @@ static int sky2_up(struct net_device *dev) | |||
1020 | struct sky2_hw *hw = sky2->hw; | 1035 | struct sky2_hw *hw = sky2->hw; |
1021 | unsigned port = sky2->port; | 1036 | unsigned port = sky2->port; |
1022 | u32 ramsize, rxspace, imask; | 1037 | u32 ramsize, rxspace, imask; |
1023 | int err; | 1038 | int cap, err = -ENOMEM; |
1024 | struct net_device *otherdev = hw->dev[sky2->port^1]; | 1039 | struct net_device *otherdev = hw->dev[sky2->port^1]; |
1025 | 1040 | ||
1026 | /* Block bringing up both ports at the same time on a dual port card. | 1041 | /* |
1027 | * There is an unfixed bug where receiver gets confused and picks up | 1042 | * On dual port PCI-X card, there is an problem where status |
1028 | * packets out of order. Until this is fixed, prevent data corruption. | 1043 | * can be received out of order due to split transactions |
1029 | */ | 1044 | */ |
1030 | if (otherdev && netif_running(otherdev)) { | 1045 | if (otherdev && netif_running(otherdev) && |
1031 | printk(KERN_INFO PFX "dual port support is disabled.\n"); | 1046 | (cap = pci_find_capability(hw->pdev, PCI_CAP_ID_PCIX))) { |
1032 | return -EBUSY; | 1047 | struct sky2_port *osky2 = netdev_priv(otherdev); |
1033 | } | 1048 | u16 cmd; |
1049 | |||
1050 | cmd = sky2_pci_read16(hw, cap + PCI_X_CMD); | ||
1051 | cmd &= ~PCI_X_CMD_MAX_SPLIT; | ||
1052 | sky2_pci_write16(hw, cap + PCI_X_CMD, cmd); | ||
1053 | |||
1054 | sky2->rx_csum = 0; | ||
1055 | osky2->rx_csum = 0; | ||
1056 | } | ||
1034 | 1057 | ||
1035 | err = -ENOMEM; | ||
1036 | if (netif_msg_ifup(sky2)) | 1058 | if (netif_msg_ifup(sky2)) |
1037 | printk(KERN_INFO PFX "%s: enabling interface\n", dev->name); | 1059 | printk(KERN_INFO PFX "%s: enabling interface\n", dev->name); |
1038 | 1060 | ||
@@ -1910,6 +1932,12 @@ static inline void sky2_tx_done(struct net_device *dev, u16 last) | |||
1910 | } | 1932 | } |
1911 | } | 1933 | } |
1912 | 1934 | ||
1935 | /* Is status ring empty or is there more to do? */ | ||
1936 | static inline int sky2_more_work(const struct sky2_hw *hw) | ||
1937 | { | ||
1938 | return (hw->st_idx != sky2_read16(hw, STAT_PUT_IDX)); | ||
1939 | } | ||
1940 | |||
1913 | /* Process status response ring */ | 1941 | /* Process status response ring */ |
1914 | static int sky2_status_intr(struct sky2_hw *hw, int to_do) | 1942 | static int sky2_status_intr(struct sky2_hw *hw, int to_do) |
1915 | { | 1943 | { |
@@ -2182,19 +2210,19 @@ static int sky2_poll(struct net_device *dev0, int *budget) | |||
2182 | if (status & Y2_IS_CHK_TXA2) | 2210 | if (status & Y2_IS_CHK_TXA2) |
2183 | sky2_descriptor_error(hw, 1, "transmit", Y2_IS_CHK_TXA2); | 2211 | sky2_descriptor_error(hw, 1, "transmit", Y2_IS_CHK_TXA2); |
2184 | 2212 | ||
2185 | if (status & Y2_IS_STAT_BMU) | ||
2186 | sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ); | ||
2187 | |||
2188 | work_done = sky2_status_intr(hw, work_limit); | 2213 | work_done = sky2_status_intr(hw, work_limit); |
2189 | *budget -= work_done; | 2214 | *budget -= work_done; |
2190 | dev0->quota -= work_done; | 2215 | dev0->quota -= work_done; |
2191 | 2216 | ||
2192 | if (work_done >= work_limit) | 2217 | if (status & Y2_IS_STAT_BMU) |
2218 | sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ); | ||
2219 | |||
2220 | if (sky2_more_work(hw)) | ||
2193 | return 1; | 2221 | return 1; |
2194 | 2222 | ||
2195 | netif_rx_complete(dev0); | 2223 | netif_rx_complete(dev0); |
2196 | 2224 | ||
2197 | status = sky2_read32(hw, B0_Y2_SP_LISR); | 2225 | sky2_read32(hw, B0_Y2_SP_LISR); |
2198 | return 0; | 2226 | return 0; |
2199 | } | 2227 | } |
2200 | 2228 | ||
@@ -3078,12 +3106,7 @@ static __devinit struct net_device *sky2_init_netdev(struct sky2_hw *hw, | |||
3078 | sky2->duplex = -1; | 3106 | sky2->duplex = -1; |
3079 | sky2->speed = -1; | 3107 | sky2->speed = -1; |
3080 | sky2->advertising = sky2_supported_modes(hw); | 3108 | sky2->advertising = sky2_supported_modes(hw); |
3081 | 3109 | sky2->rx_csum = 1; | |
3082 | /* Receive checksum disabled for Yukon XL | ||
3083 | * because of observed problems with incorrect | ||
3084 | * values when multiple packets are received in one interrupt | ||
3085 | */ | ||
3086 | sky2->rx_csum = (hw->chip_id != CHIP_ID_YUKON_XL); | ||
3087 | 3110 | ||
3088 | spin_lock_init(&sky2->phy_lock); | 3111 | spin_lock_init(&sky2->phy_lock); |
3089 | sky2->tx_pending = TX_DEF_PENDING; | 3112 | sky2->tx_pending = TX_DEF_PENDING; |
diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h index 8012994c9b93..8a0bc5525f0a 100644 --- a/drivers/net/sky2.h +++ b/drivers/net/sky2.h | |||
@@ -214,6 +214,8 @@ enum csr_regs { | |||
214 | enum { | 214 | enum { |
215 | Y2_VMAIN_AVAIL = 1<<17,/* VMAIN available (YUKON-2 only) */ | 215 | Y2_VMAIN_AVAIL = 1<<17,/* VMAIN available (YUKON-2 only) */ |
216 | Y2_VAUX_AVAIL = 1<<16,/* VAUX available (YUKON-2 only) */ | 216 | Y2_VAUX_AVAIL = 1<<16,/* VAUX available (YUKON-2 only) */ |
217 | Y2_HW_WOL_ON = 1<<15,/* HW WOL On (Yukon-EC Ultra A1 only) */ | ||
218 | Y2_HW_WOL_OFF = 1<<14,/* HW WOL On (Yukon-EC Ultra A1 only) */ | ||
217 | Y2_ASF_ENABLE = 1<<13,/* ASF Unit Enable (YUKON-2 only) */ | 219 | Y2_ASF_ENABLE = 1<<13,/* ASF Unit Enable (YUKON-2 only) */ |
218 | Y2_ASF_DISABLE = 1<<12,/* ASF Unit Disable (YUKON-2 only) */ | 220 | Y2_ASF_DISABLE = 1<<12,/* ASF Unit Disable (YUKON-2 only) */ |
219 | Y2_CLK_RUN_ENA = 1<<11,/* CLK_RUN Enable (YUKON-2 only) */ | 221 | Y2_CLK_RUN_ENA = 1<<11,/* CLK_RUN Enable (YUKON-2 only) */ |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index e1b33a25a25f..49ad60b72657 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -69,8 +69,8 @@ | |||
69 | 69 | ||
70 | #define DRV_MODULE_NAME "tg3" | 70 | #define DRV_MODULE_NAME "tg3" |
71 | #define PFX DRV_MODULE_NAME ": " | 71 | #define PFX DRV_MODULE_NAME ": " |
72 | #define DRV_MODULE_VERSION "3.57" | 72 | #define DRV_MODULE_VERSION "3.58" |
73 | #define DRV_MODULE_RELDATE "Apr 28, 2006" | 73 | #define DRV_MODULE_RELDATE "May 22, 2006" |
74 | 74 | ||
75 | #define TG3_DEF_MAC_MODE 0 | 75 | #define TG3_DEF_MAC_MODE 0 |
76 | #define TG3_DEF_RX_MODE 0 | 76 | #define TG3_DEF_RX_MODE 0 |
@@ -6488,6 +6488,10 @@ static void tg3_periodic_fetch_stats(struct tg3 *tp) | |||
6488 | TG3_STAT_ADD32(&sp->rx_frame_too_long_errors, MAC_RX_STATS_FRAME_TOO_LONG); | 6488 | TG3_STAT_ADD32(&sp->rx_frame_too_long_errors, MAC_RX_STATS_FRAME_TOO_LONG); |
6489 | TG3_STAT_ADD32(&sp->rx_jabbers, MAC_RX_STATS_JABBERS); | 6489 | TG3_STAT_ADD32(&sp->rx_jabbers, MAC_RX_STATS_JABBERS); |
6490 | TG3_STAT_ADD32(&sp->rx_undersize_packets, MAC_RX_STATS_UNDERSIZE); | 6490 | TG3_STAT_ADD32(&sp->rx_undersize_packets, MAC_RX_STATS_UNDERSIZE); |
6491 | |||
6492 | TG3_STAT_ADD32(&sp->rxbds_empty, RCVLPC_NO_RCV_BD_CNT); | ||
6493 | TG3_STAT_ADD32(&sp->rx_discards, RCVLPC_IN_DISCARDS_CNT); | ||
6494 | TG3_STAT_ADD32(&sp->rx_errors, RCVLPC_IN_ERRORS_CNT); | ||
6491 | } | 6495 | } |
6492 | 6496 | ||
6493 | static void tg3_timer(unsigned long __opaque) | 6497 | static void tg3_timer(unsigned long __opaque) |
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c index ba05dedf29d3..136a70c4d5e4 100644 --- a/drivers/net/tulip/winbond-840.c +++ b/drivers/net/tulip/winbond-840.c | |||
@@ -850,7 +850,7 @@ static void init_rxtx_rings(struct net_device *dev) | |||
850 | break; | 850 | break; |
851 | skb->dev = dev; /* Mark as being used by this device. */ | 851 | skb->dev = dev; /* Mark as being used by this device. */ |
852 | np->rx_addr[i] = pci_map_single(np->pci_dev,skb->data, | 852 | np->rx_addr[i] = pci_map_single(np->pci_dev,skb->data, |
853 | skb->len,PCI_DMA_FROMDEVICE); | 853 | np->rx_buf_sz,PCI_DMA_FROMDEVICE); |
854 | 854 | ||
855 | np->rx_ring[i].buffer1 = np->rx_addr[i]; | 855 | np->rx_ring[i].buffer1 = np->rx_addr[i]; |
856 | np->rx_ring[i].status = DescOwn; | 856 | np->rx_ring[i].status = DescOwn; |
@@ -1316,7 +1316,7 @@ static int netdev_rx(struct net_device *dev) | |||
1316 | skb->dev = dev; /* Mark as being used by this device. */ | 1316 | skb->dev = dev; /* Mark as being used by this device. */ |
1317 | np->rx_addr[entry] = pci_map_single(np->pci_dev, | 1317 | np->rx_addr[entry] = pci_map_single(np->pci_dev, |
1318 | skb->data, | 1318 | skb->data, |
1319 | skb->len, PCI_DMA_FROMDEVICE); | 1319 | np->rx_buf_sz, PCI_DMA_FROMDEVICE); |
1320 | np->rx_ring[entry].buffer1 = np->rx_addr[entry]; | 1320 | np->rx_ring[entry].buffer1 = np->rx_addr[entry]; |
1321 | } | 1321 | } |
1322 | wmb(); | 1322 | wmb(); |
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c index a6dc53b4250d..fdc21037f6dc 100644 --- a/drivers/net/via-rhine.c +++ b/drivers/net/via-rhine.c | |||
@@ -491,8 +491,6 @@ struct rhine_private { | |||
491 | u8 tx_thresh, rx_thresh; | 491 | u8 tx_thresh, rx_thresh; |
492 | 492 | ||
493 | struct mii_if_info mii_if; | 493 | struct mii_if_info mii_if; |
494 | struct work_struct tx_timeout_task; | ||
495 | struct work_struct check_media_task; | ||
496 | void __iomem *base; | 494 | void __iomem *base; |
497 | }; | 495 | }; |
498 | 496 | ||
@@ -500,8 +498,6 @@ static int mdio_read(struct net_device *dev, int phy_id, int location); | |||
500 | static void mdio_write(struct net_device *dev, int phy_id, int location, int value); | 498 | static void mdio_write(struct net_device *dev, int phy_id, int location, int value); |
501 | static int rhine_open(struct net_device *dev); | 499 | static int rhine_open(struct net_device *dev); |
502 | static void rhine_tx_timeout(struct net_device *dev); | 500 | static void rhine_tx_timeout(struct net_device *dev); |
503 | static void rhine_tx_timeout_task(struct net_device *dev); | ||
504 | static void rhine_check_media_task(struct net_device *dev); | ||
505 | static int rhine_start_tx(struct sk_buff *skb, struct net_device *dev); | 501 | static int rhine_start_tx(struct sk_buff *skb, struct net_device *dev); |
506 | static irqreturn_t rhine_interrupt(int irq, void *dev_instance, struct pt_regs *regs); | 502 | static irqreturn_t rhine_interrupt(int irq, void *dev_instance, struct pt_regs *regs); |
507 | static void rhine_tx(struct net_device *dev); | 503 | static void rhine_tx(struct net_device *dev); |
@@ -856,12 +852,6 @@ static int __devinit rhine_init_one(struct pci_dev *pdev, | |||
856 | if (rp->quirks & rqRhineI) | 852 | if (rp->quirks & rqRhineI) |
857 | dev->features |= NETIF_F_SG|NETIF_F_HW_CSUM; | 853 | dev->features |= NETIF_F_SG|NETIF_F_HW_CSUM; |
858 | 854 | ||
859 | INIT_WORK(&rp->tx_timeout_task, | ||
860 | (void (*)(void *))rhine_tx_timeout_task, dev); | ||
861 | |||
862 | INIT_WORK(&rp->check_media_task, | ||
863 | (void (*)(void *))rhine_check_media_task, dev); | ||
864 | |||
865 | /* dev->name not defined before register_netdev()! */ | 855 | /* dev->name not defined before register_netdev()! */ |
866 | rc = register_netdev(dev); | 856 | rc = register_netdev(dev); |
867 | if (rc) | 857 | if (rc) |
@@ -1108,11 +1098,6 @@ static void rhine_set_carrier(struct mii_if_info *mii) | |||
1108 | netif_carrier_ok(mii->dev)); | 1098 | netif_carrier_ok(mii->dev)); |
1109 | } | 1099 | } |
1110 | 1100 | ||
1111 | static void rhine_check_media_task(struct net_device *dev) | ||
1112 | { | ||
1113 | rhine_check_media(dev, 0); | ||
1114 | } | ||
1115 | |||
1116 | static void init_registers(struct net_device *dev) | 1101 | static void init_registers(struct net_device *dev) |
1117 | { | 1102 | { |
1118 | struct rhine_private *rp = netdev_priv(dev); | 1103 | struct rhine_private *rp = netdev_priv(dev); |
@@ -1166,8 +1151,8 @@ static void rhine_disable_linkmon(void __iomem *ioaddr, u32 quirks) | |||
1166 | if (quirks & rqRhineI) { | 1151 | if (quirks & rqRhineI) { |
1167 | iowrite8(0x01, ioaddr + MIIRegAddr); // MII_BMSR | 1152 | iowrite8(0x01, ioaddr + MIIRegAddr); // MII_BMSR |
1168 | 1153 | ||
1169 | /* Do not call from ISR! */ | 1154 | /* Can be called from ISR. Evil. */ |
1170 | msleep(1); | 1155 | mdelay(1); |
1171 | 1156 | ||
1172 | /* 0x80 must be set immediately before turning it off */ | 1157 | /* 0x80 must be set immediately before turning it off */ |
1173 | iowrite8(0x80, ioaddr + MIICmd); | 1158 | iowrite8(0x80, ioaddr + MIICmd); |
@@ -1257,16 +1242,6 @@ static int rhine_open(struct net_device *dev) | |||
1257 | static void rhine_tx_timeout(struct net_device *dev) | 1242 | static void rhine_tx_timeout(struct net_device *dev) |
1258 | { | 1243 | { |
1259 | struct rhine_private *rp = netdev_priv(dev); | 1244 | struct rhine_private *rp = netdev_priv(dev); |
1260 | |||
1261 | /* | ||
1262 | * Move bulk of work outside of interrupt context | ||
1263 | */ | ||
1264 | schedule_work(&rp->tx_timeout_task); | ||
1265 | } | ||
1266 | |||
1267 | static void rhine_tx_timeout_task(struct net_device *dev) | ||
1268 | { | ||
1269 | struct rhine_private *rp = netdev_priv(dev); | ||
1270 | void __iomem *ioaddr = rp->base; | 1245 | void __iomem *ioaddr = rp->base; |
1271 | 1246 | ||
1272 | printk(KERN_WARNING "%s: Transmit timed out, status %4.4x, PHY status " | 1247 | printk(KERN_WARNING "%s: Transmit timed out, status %4.4x, PHY status " |
@@ -1677,7 +1652,7 @@ static void rhine_error(struct net_device *dev, int intr_status) | |||
1677 | spin_lock(&rp->lock); | 1652 | spin_lock(&rp->lock); |
1678 | 1653 | ||
1679 | if (intr_status & IntrLinkChange) | 1654 | if (intr_status & IntrLinkChange) |
1680 | schedule_work(&rp->check_media_task); | 1655 | rhine_check_media(dev, 0); |
1681 | if (intr_status & IntrStatsMax) { | 1656 | if (intr_status & IntrStatsMax) { |
1682 | rp->stats.rx_crc_errors += ioread16(ioaddr + RxCRCErrs); | 1657 | rp->stats.rx_crc_errors += ioread16(ioaddr + RxCRCErrs); |
1683 | rp->stats.rx_missed_errors += ioread16(ioaddr + RxMissed); | 1658 | rp->stats.rx_missed_errors += ioread16(ioaddr + RxMissed); |
@@ -1927,9 +1902,6 @@ static int rhine_close(struct net_device *dev) | |||
1927 | spin_unlock_irq(&rp->lock); | 1902 | spin_unlock_irq(&rp->lock); |
1928 | 1903 | ||
1929 | free_irq(rp->pdev->irq, dev); | 1904 | free_irq(rp->pdev->irq, dev); |
1930 | |||
1931 | flush_scheduled_work(); | ||
1932 | |||
1933 | free_rbufs(dev); | 1905 | free_rbufs(dev); |
1934 | free_tbufs(dev); | 1906 | free_tbufs(dev); |
1935 | free_ring(dev); | 1907 | free_ring(dev); |
diff --git a/drivers/net/wireless/arlan-main.c b/drivers/net/wireless/arlan-main.c index 0e1ac338cac1..bed6823d9809 100644 --- a/drivers/net/wireless/arlan-main.c +++ b/drivers/net/wireless/arlan-main.c | |||
@@ -1838,7 +1838,7 @@ struct net_device * __init arlan_probe(int unit) | |||
1838 | } | 1838 | } |
1839 | 1839 | ||
1840 | #ifdef MODULE | 1840 | #ifdef MODULE |
1841 | int init_module(void) | 1841 | int __init init_module(void) |
1842 | { | 1842 | { |
1843 | int i = 0; | 1843 | int i = 0; |
1844 | 1844 | ||
@@ -1860,7 +1860,7 @@ int init_module(void) | |||
1860 | } | 1860 | } |
1861 | 1861 | ||
1862 | 1862 | ||
1863 | void cleanup_module(void) | 1863 | void __exit cleanup_module(void) |
1864 | { | 1864 | { |
1865 | int i = 0; | 1865 | int i = 0; |
1866 | struct net_device *dev; | 1866 | struct net_device *dev; |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index e2982a83ae42..7ed18cad29f7 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c | |||
@@ -3271,6 +3271,9 @@ static int bcm43xx_init_board(struct bcm43xx_private *bcm) | |||
3271 | bcm43xx_sysfs_register(bcm); | 3271 | bcm43xx_sysfs_register(bcm); |
3272 | //FIXME: check for bcm43xx_sysfs_register failure. This function is a bit messy regarding unwinding, though... | 3272 | //FIXME: check for bcm43xx_sysfs_register failure. This function is a bit messy regarding unwinding, though... |
3273 | 3273 | ||
3274 | /*FIXME: This should be handled by softmac instead. */ | ||
3275 | schedule_work(&bcm->softmac->associnfo.work); | ||
3276 | |||
3274 | assert(err == 0); | 3277 | assert(err == 0); |
3275 | out: | 3278 | out: |
3276 | return err; | 3279 | return err; |
@@ -3946,9 +3949,6 @@ static int bcm43xx_resume(struct pci_dev *pdev) | |||
3946 | 3949 | ||
3947 | netif_device_attach(net_dev); | 3950 | netif_device_attach(net_dev); |
3948 | 3951 | ||
3949 | /*FIXME: This should be handled by softmac instead. */ | ||
3950 | schedule_work(&bcm->softmac->associnfo.work); | ||
3951 | |||
3952 | dprintk(KERN_INFO PFX "Device resumed.\n"); | 3952 | dprintk(KERN_INFO PFX "Device resumed.\n"); |
3953 | 3953 | ||
3954 | return 0; | 3954 | return 0; |
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index 06523e2a8471..c2d0b09e0418 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c | |||
@@ -812,7 +812,6 @@ static void orinoco_rx_monitor(struct net_device *dev, u16 rxfid, | |||
812 | if (datalen > IEEE80211_DATA_LEN + 12) { | 812 | if (datalen > IEEE80211_DATA_LEN + 12) { |
813 | printk(KERN_DEBUG "%s: oversized monitor frame, " | 813 | printk(KERN_DEBUG "%s: oversized monitor frame, " |
814 | "data length = %d\n", dev->name, datalen); | 814 | "data length = %d\n", dev->name, datalen); |
815 | err = -EIO; | ||
816 | stats->rx_length_errors++; | 815 | stats->rx_length_errors++; |
817 | goto update_stats; | 816 | goto update_stats; |
818 | } | 817 | } |
@@ -821,8 +820,7 @@ static void orinoco_rx_monitor(struct net_device *dev, u16 rxfid, | |||
821 | if (!skb) { | 820 | if (!skb) { |
822 | printk(KERN_WARNING "%s: Cannot allocate skb for monitor frame\n", | 821 | printk(KERN_WARNING "%s: Cannot allocate skb for monitor frame\n", |
823 | dev->name); | 822 | dev->name); |
824 | err = -ENOMEM; | 823 | goto update_stats; |
825 | goto drop; | ||
826 | } | 824 | } |
827 | 825 | ||
828 | /* Copy the 802.11 header to the skb */ | 826 | /* Copy the 802.11 header to the skb */ |
diff --git a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c index ff192e96268a..dade4b903579 100644 --- a/drivers/net/wireless/wavelan.c +++ b/drivers/net/wireless/wavelan.c | |||
@@ -4306,7 +4306,7 @@ out: | |||
4306 | * Insertion of the module | 4306 | * Insertion of the module |
4307 | * I'm now quite proud of the multi-device support. | 4307 | * I'm now quite proud of the multi-device support. |
4308 | */ | 4308 | */ |
4309 | int init_module(void) | 4309 | int __init init_module(void) |
4310 | { | 4310 | { |
4311 | int ret = -EIO; /* Return error if no cards found */ | 4311 | int ret = -EIO; /* Return error if no cards found */ |
4312 | int i; | 4312 | int i; |