diff options
author | David S. Miller <davem@davemloft.net> | 2011-05-17 17:33:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-17 17:33:11 -0400 |
commit | 9cbc94eabb0791906051bbfac024ef2c2be8e079 (patch) | |
tree | 41ba194e687c6c60f5c883f98737ac83257d0c00 /drivers | |
parent | 1d1652cbdb9885e4d73972263e4cdbe1b0beebfe (diff) | |
parent | 7cc31a9ae1477abc79d5992b3afe889f25c50c99 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/vmxnet3/vmxnet3_ethtool.c
net/core/dev.c
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/Makefile | 6 | ||||
-rw-r--r-- | drivers/net/bonding/bond_3ad.h | 10 | ||||
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 6 | ||||
-rw-r--r-- | drivers/net/hydra.c | 14 | ||||
-rw-r--r-- | drivers/net/ne-h8300.c | 16 | ||||
-rw-r--r-- | drivers/net/sfc/mcdi.c | 49 | ||||
-rw-r--r-- | drivers/net/sfc/nic.c | 7 | ||||
-rw-r--r-- | drivers/net/sfc/nic.h | 2 | ||||
-rw-r--r-- | drivers/net/sfc/siena.c | 25 | ||||
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_ethtool.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-core.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-dev.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 6 | ||||
-rw-r--r-- | drivers/net/zorro8390.c | 12 |
15 files changed, 118 insertions, 57 deletions
diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 01b604ad155e..e5a7375685ad 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile | |||
@@ -144,7 +144,7 @@ obj-$(CONFIG_NE3210) += ne3210.o 8390.o | |||
144 | obj-$(CONFIG_SB1250_MAC) += sb1250-mac.o | 144 | obj-$(CONFIG_SB1250_MAC) += sb1250-mac.o |
145 | obj-$(CONFIG_B44) += b44.o | 145 | obj-$(CONFIG_B44) += b44.o |
146 | obj-$(CONFIG_FORCEDETH) += forcedeth.o | 146 | obj-$(CONFIG_FORCEDETH) += forcedeth.o |
147 | obj-$(CONFIG_NE_H8300) += ne-h8300.o 8390.o | 147 | obj-$(CONFIG_NE_H8300) += ne-h8300.o |
148 | obj-$(CONFIG_AX88796) += ax88796.o | 148 | obj-$(CONFIG_AX88796) += ax88796.o |
149 | obj-$(CONFIG_BCM63XX_ENET) += bcm63xx_enet.o | 149 | obj-$(CONFIG_BCM63XX_ENET) += bcm63xx_enet.o |
150 | obj-$(CONFIG_FTMAC100) += ftmac100.o | 150 | obj-$(CONFIG_FTMAC100) += ftmac100.o |
@@ -219,7 +219,7 @@ obj-$(CONFIG_SC92031) += sc92031.o | |||
219 | obj-$(CONFIG_LP486E) += lp486e.o | 219 | obj-$(CONFIG_LP486E) += lp486e.o |
220 | 220 | ||
221 | obj-$(CONFIG_ETH16I) += eth16i.o | 221 | obj-$(CONFIG_ETH16I) += eth16i.o |
222 | obj-$(CONFIG_ZORRO8390) += zorro8390.o 8390.o | 222 | obj-$(CONFIG_ZORRO8390) += zorro8390.o |
223 | obj-$(CONFIG_HPLANCE) += hplance.o 7990.o | 223 | obj-$(CONFIG_HPLANCE) += hplance.o 7990.o |
224 | obj-$(CONFIG_MVME147_NET) += mvme147.o 7990.o | 224 | obj-$(CONFIG_MVME147_NET) += mvme147.o 7990.o |
225 | obj-$(CONFIG_EQUALIZER) += eql.o | 225 | obj-$(CONFIG_EQUALIZER) += eql.o |
@@ -231,7 +231,7 @@ obj-$(CONFIG_SGI_IOC3_ETH) += ioc3-eth.o | |||
231 | obj-$(CONFIG_DECLANCE) += declance.o | 231 | obj-$(CONFIG_DECLANCE) += declance.o |
232 | obj-$(CONFIG_ATARILANCE) += atarilance.o | 232 | obj-$(CONFIG_ATARILANCE) += atarilance.o |
233 | obj-$(CONFIG_A2065) += a2065.o | 233 | obj-$(CONFIG_A2065) += a2065.o |
234 | obj-$(CONFIG_HYDRA) += hydra.o 8390.o | 234 | obj-$(CONFIG_HYDRA) += hydra.o |
235 | obj-$(CONFIG_ARIADNE) += ariadne.o | 235 | obj-$(CONFIG_ARIADNE) += ariadne.o |
236 | obj-$(CONFIG_CS89x0) += cs89x0.o | 236 | obj-$(CONFIG_CS89x0) += cs89x0.o |
237 | obj-$(CONFIG_MACSONIC) += macsonic.o | 237 | obj-$(CONFIG_MACSONIC) += macsonic.o |
diff --git a/drivers/net/bonding/bond_3ad.h b/drivers/net/bonding/bond_3ad.h index 291dbd4d1f3d..0ee3f1632c46 100644 --- a/drivers/net/bonding/bond_3ad.h +++ b/drivers/net/bonding/bond_3ad.h | |||
@@ -39,7 +39,7 @@ | |||
39 | 39 | ||
40 | typedef struct mac_addr { | 40 | typedef struct mac_addr { |
41 | u8 mac_addr_value[ETH_ALEN]; | 41 | u8 mac_addr_value[ETH_ALEN]; |
42 | } mac_addr_t; | 42 | } __packed mac_addr_t; |
43 | 43 | ||
44 | enum { | 44 | enum { |
45 | BOND_AD_STABLE = 0, | 45 | BOND_AD_STABLE = 0, |
@@ -134,12 +134,12 @@ typedef struct lacpdu { | |||
134 | u8 tlv_type_terminator; // = terminator | 134 | u8 tlv_type_terminator; // = terminator |
135 | u8 terminator_length; // = 0 | 135 | u8 terminator_length; // = 0 |
136 | u8 reserved_50[50]; // = 0 | 136 | u8 reserved_50[50]; // = 0 |
137 | } lacpdu_t; | 137 | } __packed lacpdu_t; |
138 | 138 | ||
139 | typedef struct lacpdu_header { | 139 | typedef struct lacpdu_header { |
140 | struct ethhdr hdr; | 140 | struct ethhdr hdr; |
141 | struct lacpdu lacpdu; | 141 | struct lacpdu lacpdu; |
142 | } lacpdu_header_t; | 142 | } __packed lacpdu_header_t; |
143 | 143 | ||
144 | // Marker Protocol Data Unit(PDU) structure(43.5.3.2 in the 802.3ad standard) | 144 | // Marker Protocol Data Unit(PDU) structure(43.5.3.2 in the 802.3ad standard) |
145 | typedef struct bond_marker { | 145 | typedef struct bond_marker { |
@@ -155,12 +155,12 @@ typedef struct bond_marker { | |||
155 | u8 tlv_type_terminator; // = 0x00 | 155 | u8 tlv_type_terminator; // = 0x00 |
156 | u8 terminator_length; // = 0x00 | 156 | u8 terminator_length; // = 0x00 |
157 | u8 reserved_90[90]; // = 0 | 157 | u8 reserved_90[90]; // = 0 |
158 | } bond_marker_t; | 158 | } __packed bond_marker_t; |
159 | 159 | ||
160 | typedef struct bond_marker_header { | 160 | typedef struct bond_marker_header { |
161 | struct ethhdr hdr; | 161 | struct ethhdr hdr; |
162 | struct bond_marker marker; | 162 | struct bond_marker marker; |
163 | } bond_marker_header_t; | 163 | } __packed bond_marker_header_t; |
164 | 164 | ||
165 | #pragma pack() | 165 | #pragma pack() |
166 | 166 | ||
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index a004bbcf72e6..ba763e0481e3 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -2688,9 +2688,6 @@ static int ehea_open(struct net_device *dev) | |||
2688 | netif_start_queue(dev); | 2688 | netif_start_queue(dev); |
2689 | } | 2689 | } |
2690 | 2690 | ||
2691 | init_waitqueue_head(&port->swqe_avail_wq); | ||
2692 | init_waitqueue_head(&port->restart_wq); | ||
2693 | |||
2694 | mutex_unlock(&port->port_lock); | 2691 | mutex_unlock(&port->port_lock); |
2695 | 2692 | ||
2696 | return ret; | 2693 | return ret; |
@@ -3278,6 +3275,9 @@ struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter, | |||
3278 | 3275 | ||
3279 | INIT_WORK(&port->reset_task, ehea_reset_port); | 3276 | INIT_WORK(&port->reset_task, ehea_reset_port); |
3280 | 3277 | ||
3278 | init_waitqueue_head(&port->swqe_avail_wq); | ||
3279 | init_waitqueue_head(&port->restart_wq); | ||
3280 | |||
3281 | ret = register_netdev(dev); | 3281 | ret = register_netdev(dev); |
3282 | if (ret) { | 3282 | if (ret) { |
3283 | pr_err("register_netdev failed. ret=%d\n", ret); | 3283 | pr_err("register_netdev failed. ret=%d\n", ret); |
diff --git a/drivers/net/hydra.c b/drivers/net/hydra.c index c5ef62ceb840..1cd481c04202 100644 --- a/drivers/net/hydra.c +++ b/drivers/net/hydra.c | |||
@@ -98,15 +98,15 @@ static const struct net_device_ops hydra_netdev_ops = { | |||
98 | .ndo_open = hydra_open, | 98 | .ndo_open = hydra_open, |
99 | .ndo_stop = hydra_close, | 99 | .ndo_stop = hydra_close, |
100 | 100 | ||
101 | .ndo_start_xmit = ei_start_xmit, | 101 | .ndo_start_xmit = __ei_start_xmit, |
102 | .ndo_tx_timeout = ei_tx_timeout, | 102 | .ndo_tx_timeout = __ei_tx_timeout, |
103 | .ndo_get_stats = ei_get_stats, | 103 | .ndo_get_stats = __ei_get_stats, |
104 | .ndo_set_multicast_list = ei_set_multicast_list, | 104 | .ndo_set_multicast_list = __ei_set_multicast_list, |
105 | .ndo_validate_addr = eth_validate_addr, | 105 | .ndo_validate_addr = eth_validate_addr, |
106 | .ndo_set_mac_address = eth_mac_addr, | 106 | .ndo_set_mac_address = eth_mac_addr, |
107 | .ndo_change_mtu = eth_change_mtu, | 107 | .ndo_change_mtu = eth_change_mtu, |
108 | #ifdef CONFIG_NET_POLL_CONTROLLER | 108 | #ifdef CONFIG_NET_POLL_CONTROLLER |
109 | .ndo_poll_controller = ei_poll, | 109 | .ndo_poll_controller = __ei_poll, |
110 | #endif | 110 | #endif |
111 | }; | 111 | }; |
112 | 112 | ||
@@ -125,7 +125,7 @@ static int __devinit hydra_init(struct zorro_dev *z) | |||
125 | 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e, | 125 | 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e, |
126 | }; | 126 | }; |
127 | 127 | ||
128 | dev = alloc_ei_netdev(); | 128 | dev = ____alloc_ei_netdev(0); |
129 | if (!dev) | 129 | if (!dev) |
130 | return -ENOMEM; | 130 | return -ENOMEM; |
131 | 131 | ||
diff --git a/drivers/net/ne-h8300.c b/drivers/net/ne-h8300.c index 30be8c634ebd..7298a34bc795 100644 --- a/drivers/net/ne-h8300.c +++ b/drivers/net/ne-h8300.c | |||
@@ -167,7 +167,7 @@ static void cleanup_card(struct net_device *dev) | |||
167 | #ifndef MODULE | 167 | #ifndef MODULE |
168 | struct net_device * __init ne_probe(int unit) | 168 | struct net_device * __init ne_probe(int unit) |
169 | { | 169 | { |
170 | struct net_device *dev = alloc_ei_netdev(); | 170 | struct net_device *dev = ____alloc_ei_netdev(0); |
171 | int err; | 171 | int err; |
172 | 172 | ||
173 | if (!dev) | 173 | if (!dev) |
@@ -197,15 +197,15 @@ static const struct net_device_ops ne_netdev_ops = { | |||
197 | .ndo_open = ne_open, | 197 | .ndo_open = ne_open, |
198 | .ndo_stop = ne_close, | 198 | .ndo_stop = ne_close, |
199 | 199 | ||
200 | .ndo_start_xmit = ei_start_xmit, | 200 | .ndo_start_xmit = __ei_start_xmit, |
201 | .ndo_tx_timeout = ei_tx_timeout, | 201 | .ndo_tx_timeout = __ei_tx_timeout, |
202 | .ndo_get_stats = ei_get_stats, | 202 | .ndo_get_stats = __ei_get_stats, |
203 | .ndo_set_multicast_list = ei_set_multicast_list, | 203 | .ndo_set_multicast_list = __ei_set_multicast_list, |
204 | .ndo_validate_addr = eth_validate_addr, | 204 | .ndo_validate_addr = eth_validate_addr, |
205 | .ndo_set_mac_address = eth_mac_addr, | 205 | .ndo_set_mac_address = eth_mac_addr, |
206 | .ndo_change_mtu = eth_change_mtu, | 206 | .ndo_change_mtu = eth_change_mtu, |
207 | #ifdef CONFIG_NET_POLL_CONTROLLER | 207 | #ifdef CONFIG_NET_POLL_CONTROLLER |
208 | .ndo_poll_controller = ei_poll, | 208 | .ndo_poll_controller = __ei_poll, |
209 | #endif | 209 | #endif |
210 | }; | 210 | }; |
211 | 211 | ||
@@ -637,7 +637,7 @@ int init_module(void) | |||
637 | int err; | 637 | int err; |
638 | 638 | ||
639 | for (this_dev = 0; this_dev < MAX_NE_CARDS; this_dev++) { | 639 | for (this_dev = 0; this_dev < MAX_NE_CARDS; this_dev++) { |
640 | struct net_device *dev = alloc_ei_netdev(); | 640 | struct net_device *dev = ____alloc_ei_netdev(0); |
641 | if (!dev) | 641 | if (!dev) |
642 | break; | 642 | break; |
643 | if (io[this_dev]) { | 643 | if (io[this_dev]) { |
diff --git a/drivers/net/sfc/mcdi.c b/drivers/net/sfc/mcdi.c index d98479030ef2..3dd45ed61f0a 100644 --- a/drivers/net/sfc/mcdi.c +++ b/drivers/net/sfc/mcdi.c | |||
@@ -50,6 +50,20 @@ static inline struct efx_mcdi_iface *efx_mcdi(struct efx_nic *efx) | |||
50 | return &nic_data->mcdi; | 50 | return &nic_data->mcdi; |
51 | } | 51 | } |
52 | 52 | ||
53 | static inline void | ||
54 | efx_mcdi_readd(struct efx_nic *efx, efx_dword_t *value, unsigned reg) | ||
55 | { | ||
56 | struct siena_nic_data *nic_data = efx->nic_data; | ||
57 | value->u32[0] = (__force __le32)__raw_readl(nic_data->mcdi_smem + reg); | ||
58 | } | ||
59 | |||
60 | static inline void | ||
61 | efx_mcdi_writed(struct efx_nic *efx, const efx_dword_t *value, unsigned reg) | ||
62 | { | ||
63 | struct siena_nic_data *nic_data = efx->nic_data; | ||
64 | __raw_writel((__force u32)value->u32[0], nic_data->mcdi_smem + reg); | ||
65 | } | ||
66 | |||
53 | void efx_mcdi_init(struct efx_nic *efx) | 67 | void efx_mcdi_init(struct efx_nic *efx) |
54 | { | 68 | { |
55 | struct efx_mcdi_iface *mcdi; | 69 | struct efx_mcdi_iface *mcdi; |
@@ -70,8 +84,8 @@ static void efx_mcdi_copyin(struct efx_nic *efx, unsigned cmd, | |||
70 | const u8 *inbuf, size_t inlen) | 84 | const u8 *inbuf, size_t inlen) |
71 | { | 85 | { |
72 | struct efx_mcdi_iface *mcdi = efx_mcdi(efx); | 86 | struct efx_mcdi_iface *mcdi = efx_mcdi(efx); |
73 | unsigned pdu = FR_CZ_MC_TREG_SMEM + MCDI_PDU(efx); | 87 | unsigned pdu = MCDI_PDU(efx); |
74 | unsigned doorbell = FR_CZ_MC_TREG_SMEM + MCDI_DOORBELL(efx); | 88 | unsigned doorbell = MCDI_DOORBELL(efx); |
75 | unsigned int i; | 89 | unsigned int i; |
76 | efx_dword_t hdr; | 90 | efx_dword_t hdr; |
77 | u32 xflags, seqno; | 91 | u32 xflags, seqno; |
@@ -92,30 +106,28 @@ static void efx_mcdi_copyin(struct efx_nic *efx, unsigned cmd, | |||
92 | MCDI_HEADER_SEQ, seqno, | 106 | MCDI_HEADER_SEQ, seqno, |
93 | MCDI_HEADER_XFLAGS, xflags); | 107 | MCDI_HEADER_XFLAGS, xflags); |
94 | 108 | ||
95 | efx_writed(efx, &hdr, pdu); | 109 | efx_mcdi_writed(efx, &hdr, pdu); |
96 | 110 | ||
97 | for (i = 0; i < inlen; i += 4) { | 111 | for (i = 0; i < inlen; i += 4) |
98 | _efx_writed(efx, *((__le32 *)(inbuf + i)), pdu + 4 + i); | 112 | efx_mcdi_writed(efx, (const efx_dword_t *)(inbuf + i), |
99 | /* use wmb() within loop to inhibit write combining */ | 113 | pdu + 4 + i); |
100 | wmb(); | ||
101 | } | ||
102 | 114 | ||
103 | /* ring the doorbell with a distinctive value */ | 115 | /* ring the doorbell with a distinctive value */ |
104 | _efx_writed(efx, (__force __le32) 0x45789abc, doorbell); | 116 | EFX_POPULATE_DWORD_1(hdr, EFX_DWORD_0, 0x45789abc); |
105 | wmb(); | 117 | efx_mcdi_writed(efx, &hdr, doorbell); |
106 | } | 118 | } |
107 | 119 | ||
108 | static void efx_mcdi_copyout(struct efx_nic *efx, u8 *outbuf, size_t outlen) | 120 | static void efx_mcdi_copyout(struct efx_nic *efx, u8 *outbuf, size_t outlen) |
109 | { | 121 | { |
110 | struct efx_mcdi_iface *mcdi = efx_mcdi(efx); | 122 | struct efx_mcdi_iface *mcdi = efx_mcdi(efx); |
111 | unsigned int pdu = FR_CZ_MC_TREG_SMEM + MCDI_PDU(efx); | 123 | unsigned int pdu = MCDI_PDU(efx); |
112 | int i; | 124 | int i; |
113 | 125 | ||
114 | BUG_ON(atomic_read(&mcdi->state) == MCDI_STATE_QUIESCENT); | 126 | BUG_ON(atomic_read(&mcdi->state) == MCDI_STATE_QUIESCENT); |
115 | BUG_ON(outlen & 3 || outlen >= 0x100); | 127 | BUG_ON(outlen & 3 || outlen >= 0x100); |
116 | 128 | ||
117 | for (i = 0; i < outlen; i += 4) | 129 | for (i = 0; i < outlen; i += 4) |
118 | *((__le32 *)(outbuf + i)) = _efx_readd(efx, pdu + 4 + i); | 130 | efx_mcdi_readd(efx, (efx_dword_t *)(outbuf + i), pdu + 4 + i); |
119 | } | 131 | } |
120 | 132 | ||
121 | static int efx_mcdi_poll(struct efx_nic *efx) | 133 | static int efx_mcdi_poll(struct efx_nic *efx) |
@@ -123,7 +135,7 @@ static int efx_mcdi_poll(struct efx_nic *efx) | |||
123 | struct efx_mcdi_iface *mcdi = efx_mcdi(efx); | 135 | struct efx_mcdi_iface *mcdi = efx_mcdi(efx); |
124 | unsigned int time, finish; | 136 | unsigned int time, finish; |
125 | unsigned int respseq, respcmd, error; | 137 | unsigned int respseq, respcmd, error; |
126 | unsigned int pdu = FR_CZ_MC_TREG_SMEM + MCDI_PDU(efx); | 138 | unsigned int pdu = MCDI_PDU(efx); |
127 | unsigned int rc, spins; | 139 | unsigned int rc, spins; |
128 | efx_dword_t reg; | 140 | efx_dword_t reg; |
129 | 141 | ||
@@ -149,8 +161,7 @@ static int efx_mcdi_poll(struct efx_nic *efx) | |||
149 | 161 | ||
150 | time = get_seconds(); | 162 | time = get_seconds(); |
151 | 163 | ||
152 | rmb(); | 164 | efx_mcdi_readd(efx, ®, pdu); |
153 | efx_readd(efx, ®, pdu); | ||
154 | 165 | ||
155 | /* All 1's indicates that shared memory is in reset (and is | 166 | /* All 1's indicates that shared memory is in reset (and is |
156 | * not a valid header). Wait for it to come out reset before | 167 | * not a valid header). Wait for it to come out reset before |
@@ -177,7 +188,7 @@ static int efx_mcdi_poll(struct efx_nic *efx) | |||
177 | respseq, mcdi->seqno); | 188 | respseq, mcdi->seqno); |
178 | rc = EIO; | 189 | rc = EIO; |
179 | } else if (error) { | 190 | } else if (error) { |
180 | efx_readd(efx, ®, pdu + 4); | 191 | efx_mcdi_readd(efx, ®, pdu + 4); |
181 | switch (EFX_DWORD_FIELD(reg, EFX_DWORD_0)) { | 192 | switch (EFX_DWORD_FIELD(reg, EFX_DWORD_0)) { |
182 | #define TRANSLATE_ERROR(name) \ | 193 | #define TRANSLATE_ERROR(name) \ |
183 | case MC_CMD_ERR_ ## name: \ | 194 | case MC_CMD_ERR_ ## name: \ |
@@ -211,21 +222,21 @@ out: | |||
211 | /* Test and clear MC-rebooted flag for this port/function */ | 222 | /* Test and clear MC-rebooted flag for this port/function */ |
212 | int efx_mcdi_poll_reboot(struct efx_nic *efx) | 223 | int efx_mcdi_poll_reboot(struct efx_nic *efx) |
213 | { | 224 | { |
214 | unsigned int addr = FR_CZ_MC_TREG_SMEM + MCDI_REBOOT_FLAG(efx); | 225 | unsigned int addr = MCDI_REBOOT_FLAG(efx); |
215 | efx_dword_t reg; | 226 | efx_dword_t reg; |
216 | uint32_t value; | 227 | uint32_t value; |
217 | 228 | ||
218 | if (efx_nic_rev(efx) < EFX_REV_SIENA_A0) | 229 | if (efx_nic_rev(efx) < EFX_REV_SIENA_A0) |
219 | return false; | 230 | return false; |
220 | 231 | ||
221 | efx_readd(efx, ®, addr); | 232 | efx_mcdi_readd(efx, ®, addr); |
222 | value = EFX_DWORD_FIELD(reg, EFX_DWORD_0); | 233 | value = EFX_DWORD_FIELD(reg, EFX_DWORD_0); |
223 | 234 | ||
224 | if (value == 0) | 235 | if (value == 0) |
225 | return 0; | 236 | return 0; |
226 | 237 | ||
227 | EFX_ZERO_DWORD(reg); | 238 | EFX_ZERO_DWORD(reg); |
228 | efx_writed(efx, ®, addr); | 239 | efx_mcdi_writed(efx, ®, addr); |
229 | 240 | ||
230 | if (value == MC_STATUS_DWORD_ASSERT) | 241 | if (value == MC_STATUS_DWORD_ASSERT) |
231 | return -EINTR; | 242 | return -EINTR; |
diff --git a/drivers/net/sfc/nic.c b/drivers/net/sfc/nic.c index 5ac9fa2cd3bc..f2a2b947f860 100644 --- a/drivers/net/sfc/nic.c +++ b/drivers/net/sfc/nic.c | |||
@@ -1935,6 +1935,13 @@ void efx_nic_get_regs(struct efx_nic *efx, void *buf) | |||
1935 | 1935 | ||
1936 | size = min_t(size_t, table->step, 16); | 1936 | size = min_t(size_t, table->step, 16); |
1937 | 1937 | ||
1938 | if (table->offset >= efx->type->mem_map_size) { | ||
1939 | /* No longer mapped; return dummy data */ | ||
1940 | memcpy(buf, "\xde\xc0\xad\xde", 4); | ||
1941 | buf += table->rows * size; | ||
1942 | continue; | ||
1943 | } | ||
1944 | |||
1938 | for (i = 0; i < table->rows; i++) { | 1945 | for (i = 0; i < table->rows; i++) { |
1939 | switch (table->step) { | 1946 | switch (table->step) { |
1940 | case 4: /* 32-bit register or SRAM */ | 1947 | case 4: /* 32-bit register or SRAM */ |
diff --git a/drivers/net/sfc/nic.h b/drivers/net/sfc/nic.h index 7443f99c977f..4bd1f2839dfe 100644 --- a/drivers/net/sfc/nic.h +++ b/drivers/net/sfc/nic.h | |||
@@ -143,10 +143,12 @@ static inline struct falcon_board *falcon_board(struct efx_nic *efx) | |||
143 | /** | 143 | /** |
144 | * struct siena_nic_data - Siena NIC state | 144 | * struct siena_nic_data - Siena NIC state |
145 | * @mcdi: Management-Controller-to-Driver Interface | 145 | * @mcdi: Management-Controller-to-Driver Interface |
146 | * @mcdi_smem: MCDI shared memory mapping. The mapping is always uncacheable. | ||
146 | * @wol_filter_id: Wake-on-LAN packet filter id | 147 | * @wol_filter_id: Wake-on-LAN packet filter id |
147 | */ | 148 | */ |
148 | struct siena_nic_data { | 149 | struct siena_nic_data { |
149 | struct efx_mcdi_iface mcdi; | 150 | struct efx_mcdi_iface mcdi; |
151 | void __iomem *mcdi_smem; | ||
150 | int wol_filter_id; | 152 | int wol_filter_id; |
151 | }; | 153 | }; |
152 | 154 | ||
diff --git a/drivers/net/sfc/siena.c b/drivers/net/sfc/siena.c index ceac1c9907f0..fb4721f780ff 100644 --- a/drivers/net/sfc/siena.c +++ b/drivers/net/sfc/siena.c | |||
@@ -220,12 +220,26 @@ static int siena_probe_nic(struct efx_nic *efx) | |||
220 | efx_reado(efx, ®, FR_AZ_CS_DEBUG); | 220 | efx_reado(efx, ®, FR_AZ_CS_DEBUG); |
221 | efx->net_dev->dev_id = EFX_OWORD_FIELD(reg, FRF_CZ_CS_PORT_NUM) - 1; | 221 | efx->net_dev->dev_id = EFX_OWORD_FIELD(reg, FRF_CZ_CS_PORT_NUM) - 1; |
222 | 222 | ||
223 | /* Initialise MCDI */ | ||
224 | nic_data->mcdi_smem = ioremap_nocache(efx->membase_phys + | ||
225 | FR_CZ_MC_TREG_SMEM, | ||
226 | FR_CZ_MC_TREG_SMEM_STEP * | ||
227 | FR_CZ_MC_TREG_SMEM_ROWS); | ||
228 | if (!nic_data->mcdi_smem) { | ||
229 | netif_err(efx, probe, efx->net_dev, | ||
230 | "could not map MCDI at %llx+%x\n", | ||
231 | (unsigned long long)efx->membase_phys + | ||
232 | FR_CZ_MC_TREG_SMEM, | ||
233 | FR_CZ_MC_TREG_SMEM_STEP * FR_CZ_MC_TREG_SMEM_ROWS); | ||
234 | rc = -ENOMEM; | ||
235 | goto fail1; | ||
236 | } | ||
223 | efx_mcdi_init(efx); | 237 | efx_mcdi_init(efx); |
224 | 238 | ||
225 | /* Recover from a failed assertion before probing */ | 239 | /* Recover from a failed assertion before probing */ |
226 | rc = efx_mcdi_handle_assertion(efx); | 240 | rc = efx_mcdi_handle_assertion(efx); |
227 | if (rc) | 241 | if (rc) |
228 | goto fail1; | 242 | goto fail2; |
229 | 243 | ||
230 | /* Let the BMC know that the driver is now in charge of link and | 244 | /* Let the BMC know that the driver is now in charge of link and |
231 | * filter settings. We must do this before we reset the NIC */ | 245 | * filter settings. We must do this before we reset the NIC */ |
@@ -280,6 +294,7 @@ fail4: | |||
280 | fail3: | 294 | fail3: |
281 | efx_mcdi_drv_attach(efx, false, NULL); | 295 | efx_mcdi_drv_attach(efx, false, NULL); |
282 | fail2: | 296 | fail2: |
297 | iounmap(nic_data->mcdi_smem); | ||
283 | fail1: | 298 | fail1: |
284 | kfree(efx->nic_data); | 299 | kfree(efx->nic_data); |
285 | return rc; | 300 | return rc; |
@@ -359,6 +374,8 @@ static int siena_init_nic(struct efx_nic *efx) | |||
359 | 374 | ||
360 | static void siena_remove_nic(struct efx_nic *efx) | 375 | static void siena_remove_nic(struct efx_nic *efx) |
361 | { | 376 | { |
377 | struct siena_nic_data *nic_data = efx->nic_data; | ||
378 | |||
362 | efx_nic_free_buffer(efx, &efx->irq_status); | 379 | efx_nic_free_buffer(efx, &efx->irq_status); |
363 | 380 | ||
364 | siena_reset_hw(efx, RESET_TYPE_ALL); | 381 | siena_reset_hw(efx, RESET_TYPE_ALL); |
@@ -368,7 +385,8 @@ static void siena_remove_nic(struct efx_nic *efx) | |||
368 | efx_mcdi_drv_attach(efx, false, NULL); | 385 | efx_mcdi_drv_attach(efx, false, NULL); |
369 | 386 | ||
370 | /* Tear down the private nic state */ | 387 | /* Tear down the private nic state */ |
371 | kfree(efx->nic_data); | 388 | iounmap(nic_data->mcdi_smem); |
389 | kfree(nic_data); | ||
372 | efx->nic_data = NULL; | 390 | efx->nic_data = NULL; |
373 | } | 391 | } |
374 | 392 | ||
@@ -606,8 +624,7 @@ const struct efx_nic_type siena_a0_nic_type = { | |||
606 | .default_mac_ops = &efx_mcdi_mac_operations, | 624 | .default_mac_ops = &efx_mcdi_mac_operations, |
607 | 625 | ||
608 | .revision = EFX_REV_SIENA_A0, | 626 | .revision = EFX_REV_SIENA_A0, |
609 | .mem_map_size = (FR_CZ_MC_TREG_SMEM + | 627 | .mem_map_size = FR_CZ_MC_TREG_SMEM, /* MC_TREG_SMEM mapped separately */ |
610 | FR_CZ_MC_TREG_SMEM_STEP * FR_CZ_MC_TREG_SMEM_ROWS), | ||
611 | .txd_ptr_tbl_base = FR_BZ_TX_DESC_PTR_TBL, | 628 | .txd_ptr_tbl_base = FR_BZ_TX_DESC_PTR_TBL, |
612 | .rxd_ptr_tbl_base = FR_BZ_RX_DESC_PTR_TBL, | 629 | .rxd_ptr_tbl_base = FR_BZ_RX_DESC_PTR_TBL, |
613 | .buf_tbl_base = FR_BZ_BUF_FULL_TBL, | 630 | .buf_tbl_base = FR_BZ_BUF_FULL_TBL, |
diff --git a/drivers/net/vmxnet3/vmxnet3_ethtool.c b/drivers/net/vmxnet3/vmxnet3_ethtool.c index 64303eb3a5fc..dc959fe27aa5 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethtool.c +++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c | |||
@@ -276,6 +276,7 @@ int vmxnet3_set_features(struct net_device *netdev, u32 features) | |||
276 | adapter->shared->devRead.misc.uptFeatures &= | 276 | adapter->shared->devRead.misc.uptFeatures &= |
277 | ~UPT1_F_RXCSUM; | 277 | ~UPT1_F_RXCSUM; |
278 | 278 | ||
279 | /* update harware LRO capability accordingly */ | ||
279 | if (features & NETIF_F_LRO) | 280 | if (features & NETIF_F_LRO) |
280 | adapter->shared->devRead.misc.uptFeatures |= | 281 | adapter->shared->devRead.misc.uptFeatures |= |
281 | UPT1_F_LRO; | 282 | UPT1_F_LRO; |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 45303bdbc465..17ebdf1e8b7b 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -2265,6 +2265,8 @@ static void ath9k_set_coverage_class(struct ieee80211_hw *hw, u8 coverage_class) | |||
2265 | static void ath9k_flush(struct ieee80211_hw *hw, bool drop) | 2265 | static void ath9k_flush(struct ieee80211_hw *hw, bool drop) |
2266 | { | 2266 | { |
2267 | struct ath_softc *sc = hw->priv; | 2267 | struct ath_softc *sc = hw->priv; |
2268 | struct ath_hw *ah = sc->sc_ah; | ||
2269 | struct ath_common *common = ath9k_hw_common(ah); | ||
2268 | int timeout = 200; /* ms */ | 2270 | int timeout = 200; /* ms */ |
2269 | int i, j; | 2271 | int i, j; |
2270 | bool drain_txq; | 2272 | bool drain_txq; |
@@ -2272,6 +2274,12 @@ static void ath9k_flush(struct ieee80211_hw *hw, bool drop) | |||
2272 | mutex_lock(&sc->mutex); | 2274 | mutex_lock(&sc->mutex); |
2273 | cancel_delayed_work_sync(&sc->tx_complete_work); | 2275 | cancel_delayed_work_sync(&sc->tx_complete_work); |
2274 | 2276 | ||
2277 | if (sc->sc_flags & SC_OP_INVALID) { | ||
2278 | ath_dbg(common, ATH_DBG_ANY, "Device not present\n"); | ||
2279 | mutex_unlock(&sc->mutex); | ||
2280 | return; | ||
2281 | } | ||
2282 | |||
2275 | if (drop) | 2283 | if (drop) |
2276 | timeout = 1; | 2284 | timeout = 1; |
2277 | 2285 | ||
diff --git a/drivers/net/wireless/iwlegacy/iwl-core.c b/drivers/net/wireless/iwlegacy/iwl-core.c index d743373a9424..42df8321dae8 100644 --- a/drivers/net/wireless/iwlegacy/iwl-core.c +++ b/drivers/net/wireless/iwlegacy/iwl-core.c | |||
@@ -2151,6 +2151,13 @@ int iwl_legacy_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
2151 | goto set_ch_out; | 2151 | goto set_ch_out; |
2152 | } | 2152 | } |
2153 | 2153 | ||
2154 | if (priv->iw_mode == NL80211_IFTYPE_ADHOC && | ||
2155 | !iwl_legacy_is_channel_ibss(ch_info)) { | ||
2156 | IWL_DEBUG_MAC80211(priv, "leave - not IBSS channel\n"); | ||
2157 | ret = -EINVAL; | ||
2158 | goto set_ch_out; | ||
2159 | } | ||
2160 | |||
2154 | spin_lock_irqsave(&priv->lock, flags); | 2161 | spin_lock_irqsave(&priv->lock, flags); |
2155 | 2162 | ||
2156 | for_each_context(priv, ctx) { | 2163 | for_each_context(priv, ctx) { |
diff --git a/drivers/net/wireless/iwlegacy/iwl-dev.h b/drivers/net/wireless/iwlegacy/iwl-dev.h index 2d87dba2cfa3..be0106c6a2da 100644 --- a/drivers/net/wireless/iwlegacy/iwl-dev.h +++ b/drivers/net/wireless/iwlegacy/iwl-dev.h | |||
@@ -1411,6 +1411,12 @@ iwl_legacy_is_channel_passive(const struct iwl_channel_info *ch) | |||
1411 | return (!(ch->flags & EEPROM_CHANNEL_ACTIVE)) ? 1 : 0; | 1411 | return (!(ch->flags & EEPROM_CHANNEL_ACTIVE)) ? 1 : 0; |
1412 | } | 1412 | } |
1413 | 1413 | ||
1414 | static inline int | ||
1415 | iwl_legacy_is_channel_ibss(const struct iwl_channel_info *ch) | ||
1416 | { | ||
1417 | return (ch->flags & EEPROM_CHANNEL_IBSS) ? 1 : 0; | ||
1418 | } | ||
1419 | |||
1414 | static inline void | 1420 | static inline void |
1415 | __iwl_legacy_free_pages(struct iwl_priv *priv, struct page *page) | 1421 | __iwl_legacy_free_pages(struct iwl_priv *priv, struct page *page) |
1416 | { | 1422 | { |
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 6d59b4cf8fce..84566db486d2 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -1354,8 +1354,8 @@ int lbs_execute_next_command(struct lbs_private *priv) | |||
1354 | cpu_to_le16(PS_MODE_ACTION_EXIT_PS)) { | 1354 | cpu_to_le16(PS_MODE_ACTION_EXIT_PS)) { |
1355 | lbs_deb_host( | 1355 | lbs_deb_host( |
1356 | "EXEC_NEXT_CMD: ignore ENTER_PS cmd\n"); | 1356 | "EXEC_NEXT_CMD: ignore ENTER_PS cmd\n"); |
1357 | list_del(&cmdnode->list); | ||
1358 | spin_lock_irqsave(&priv->driver_lock, flags); | 1357 | spin_lock_irqsave(&priv->driver_lock, flags); |
1358 | list_del(&cmdnode->list); | ||
1359 | lbs_complete_command(priv, cmdnode, 0); | 1359 | lbs_complete_command(priv, cmdnode, 0); |
1360 | spin_unlock_irqrestore(&priv->driver_lock, flags); | 1360 | spin_unlock_irqrestore(&priv->driver_lock, flags); |
1361 | 1361 | ||
@@ -1367,8 +1367,8 @@ int lbs_execute_next_command(struct lbs_private *priv) | |||
1367 | (priv->psstate == PS_STATE_PRE_SLEEP)) { | 1367 | (priv->psstate == PS_STATE_PRE_SLEEP)) { |
1368 | lbs_deb_host( | 1368 | lbs_deb_host( |
1369 | "EXEC_NEXT_CMD: ignore EXIT_PS cmd in sleep\n"); | 1369 | "EXEC_NEXT_CMD: ignore EXIT_PS cmd in sleep\n"); |
1370 | list_del(&cmdnode->list); | ||
1371 | spin_lock_irqsave(&priv->driver_lock, flags); | 1370 | spin_lock_irqsave(&priv->driver_lock, flags); |
1371 | list_del(&cmdnode->list); | ||
1372 | lbs_complete_command(priv, cmdnode, 0); | 1372 | lbs_complete_command(priv, cmdnode, 0); |
1373 | spin_unlock_irqrestore(&priv->driver_lock, flags); | 1373 | spin_unlock_irqrestore(&priv->driver_lock, flags); |
1374 | priv->needtowakeup = 1; | 1374 | priv->needtowakeup = 1; |
@@ -1381,7 +1381,9 @@ int lbs_execute_next_command(struct lbs_private *priv) | |||
1381 | "EXEC_NEXT_CMD: sending EXIT_PS\n"); | 1381 | "EXEC_NEXT_CMD: sending EXIT_PS\n"); |
1382 | } | 1382 | } |
1383 | } | 1383 | } |
1384 | spin_lock_irqsave(&priv->driver_lock, flags); | ||
1384 | list_del(&cmdnode->list); | 1385 | list_del(&cmdnode->list); |
1386 | spin_unlock_irqrestore(&priv->driver_lock, flags); | ||
1385 | lbs_deb_host("EXEC_NEXT_CMD: sending command 0x%04x\n", | 1387 | lbs_deb_host("EXEC_NEXT_CMD: sending command 0x%04x\n", |
1386 | le16_to_cpu(cmd->command)); | 1388 | le16_to_cpu(cmd->command)); |
1387 | lbs_submit_command(priv, cmdnode); | 1389 | lbs_submit_command(priv, cmdnode); |
diff --git a/drivers/net/zorro8390.c b/drivers/net/zorro8390.c index b78a38d9172a..8c7c522a056a 100644 --- a/drivers/net/zorro8390.c +++ b/drivers/net/zorro8390.c | |||
@@ -126,7 +126,7 @@ static int __devinit zorro8390_init_one(struct zorro_dev *z, | |||
126 | 126 | ||
127 | board = z->resource.start; | 127 | board = z->resource.start; |
128 | ioaddr = board+cards[i].offset; | 128 | ioaddr = board+cards[i].offset; |
129 | dev = alloc_ei_netdev(); | 129 | dev = ____alloc_ei_netdev(0); |
130 | if (!dev) | 130 | if (!dev) |
131 | return -ENOMEM; | 131 | return -ENOMEM; |
132 | if (!request_mem_region(ioaddr, NE_IO_EXTENT*2, DRV_NAME)) { | 132 | if (!request_mem_region(ioaddr, NE_IO_EXTENT*2, DRV_NAME)) { |
@@ -146,15 +146,15 @@ static int __devinit zorro8390_init_one(struct zorro_dev *z, | |||
146 | static const struct net_device_ops zorro8390_netdev_ops = { | 146 | static const struct net_device_ops zorro8390_netdev_ops = { |
147 | .ndo_open = zorro8390_open, | 147 | .ndo_open = zorro8390_open, |
148 | .ndo_stop = zorro8390_close, | 148 | .ndo_stop = zorro8390_close, |
149 | .ndo_start_xmit = ei_start_xmit, | 149 | .ndo_start_xmit = __ei_start_xmit, |
150 | .ndo_tx_timeout = ei_tx_timeout, | 150 | .ndo_tx_timeout = __ei_tx_timeout, |
151 | .ndo_get_stats = ei_get_stats, | 151 | .ndo_get_stats = __ei_get_stats, |
152 | .ndo_set_multicast_list = ei_set_multicast_list, | 152 | .ndo_set_multicast_list = __ei_set_multicast_list, |
153 | .ndo_validate_addr = eth_validate_addr, | 153 | .ndo_validate_addr = eth_validate_addr, |
154 | .ndo_set_mac_address = eth_mac_addr, | 154 | .ndo_set_mac_address = eth_mac_addr, |
155 | .ndo_change_mtu = eth_change_mtu, | 155 | .ndo_change_mtu = eth_change_mtu, |
156 | #ifdef CONFIG_NET_POLL_CONTROLLER | 156 | #ifdef CONFIG_NET_POLL_CONTROLLER |
157 | .ndo_poll_controller = ei_poll, | 157 | .ndo_poll_controller = __ei_poll, |
158 | #endif | 158 | #endif |
159 | }; | 159 | }; |
160 | 160 | ||