diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/sfc/efx.h | 104 | ||||
-rw-r--r-- | drivers/net/ethernet/sfc/mcdi.h | 120 | ||||
-rw-r--r-- | drivers/net/ethernet/sfc/mdio_10g.h | 26 | ||||
-rw-r--r-- | drivers/net/ethernet/sfc/nic.h | 210 | ||||
-rw-r--r-- | drivers/net/ethernet/sfc/phy.h | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/sfc/selftest.h | 15 |
6 files changed, 234 insertions, 249 deletions
diff --git a/drivers/net/ethernet/sfc/efx.h b/drivers/net/ethernet/sfc/efx.h index 31d01284e333..b8235ee5d7d7 100644 --- a/drivers/net/ethernet/sfc/efx.h +++ b/drivers/net/ethernet/sfc/efx.h | |||
@@ -18,38 +18,36 @@ | |||
18 | #define EFX_MEM_BAR 2 | 18 | #define EFX_MEM_BAR 2 |
19 | 19 | ||
20 | /* TX */ | 20 | /* TX */ |
21 | extern int efx_probe_tx_queue(struct efx_tx_queue *tx_queue); | 21 | int efx_probe_tx_queue(struct efx_tx_queue *tx_queue); |
22 | extern void efx_remove_tx_queue(struct efx_tx_queue *tx_queue); | 22 | void efx_remove_tx_queue(struct efx_tx_queue *tx_queue); |
23 | extern void efx_init_tx_queue(struct efx_tx_queue *tx_queue); | 23 | void efx_init_tx_queue(struct efx_tx_queue *tx_queue); |
24 | extern void efx_init_tx_queue_core_txq(struct efx_tx_queue *tx_queue); | 24 | void efx_init_tx_queue_core_txq(struct efx_tx_queue *tx_queue); |
25 | extern void efx_fini_tx_queue(struct efx_tx_queue *tx_queue); | 25 | void efx_fini_tx_queue(struct efx_tx_queue *tx_queue); |
26 | extern netdev_tx_t | 26 | netdev_tx_t efx_hard_start_xmit(struct sk_buff *skb, |
27 | efx_hard_start_xmit(struct sk_buff *skb, struct net_device *net_dev); | 27 | struct net_device *net_dev); |
28 | extern netdev_tx_t | 28 | netdev_tx_t efx_enqueue_skb(struct efx_tx_queue *tx_queue, struct sk_buff *skb); |
29 | efx_enqueue_skb(struct efx_tx_queue *tx_queue, struct sk_buff *skb); | 29 | void efx_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index); |
30 | extern void efx_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index); | 30 | int efx_setup_tc(struct net_device *net_dev, u8 num_tc); |
31 | extern int efx_setup_tc(struct net_device *net_dev, u8 num_tc); | 31 | unsigned int efx_tx_max_skb_descs(struct efx_nic *efx); |
32 | extern unsigned int efx_tx_max_skb_descs(struct efx_nic *efx); | ||
33 | extern unsigned int efx_piobuf_size; | 32 | extern unsigned int efx_piobuf_size; |
34 | 33 | ||
35 | /* RX */ | 34 | /* RX */ |
36 | extern void efx_rx_config_page_split(struct efx_nic *efx); | 35 | void efx_rx_config_page_split(struct efx_nic *efx); |
37 | extern int efx_probe_rx_queue(struct efx_rx_queue *rx_queue); | 36 | int efx_probe_rx_queue(struct efx_rx_queue *rx_queue); |
38 | extern void efx_remove_rx_queue(struct efx_rx_queue *rx_queue); | 37 | void efx_remove_rx_queue(struct efx_rx_queue *rx_queue); |
39 | extern void efx_init_rx_queue(struct efx_rx_queue *rx_queue); | 38 | void efx_init_rx_queue(struct efx_rx_queue *rx_queue); |
40 | extern void efx_fini_rx_queue(struct efx_rx_queue *rx_queue); | 39 | void efx_fini_rx_queue(struct efx_rx_queue *rx_queue); |
41 | extern void efx_fast_push_rx_descriptors(struct efx_rx_queue *rx_queue); | 40 | void efx_fast_push_rx_descriptors(struct efx_rx_queue *rx_queue); |
42 | extern void efx_rx_slow_fill(unsigned long context); | 41 | void efx_rx_slow_fill(unsigned long context); |
43 | extern void __efx_rx_packet(struct efx_channel *channel); | 42 | void __efx_rx_packet(struct efx_channel *channel); |
44 | extern void efx_rx_packet(struct efx_rx_queue *rx_queue, | 43 | void efx_rx_packet(struct efx_rx_queue *rx_queue, unsigned int index, |
45 | unsigned int index, unsigned int n_frags, | 44 | unsigned int n_frags, unsigned int len, u16 flags); |
46 | unsigned int len, u16 flags); | ||
47 | static inline void efx_rx_flush_packet(struct efx_channel *channel) | 45 | static inline void efx_rx_flush_packet(struct efx_channel *channel) |
48 | { | 46 | { |
49 | if (channel->rx_pkt_n_frags) | 47 | if (channel->rx_pkt_n_frags) |
50 | __efx_rx_packet(channel); | 48 | __efx_rx_packet(channel); |
51 | } | 49 | } |
52 | extern void efx_schedule_slow_fill(struct efx_rx_queue *rx_queue); | 50 | void efx_schedule_slow_fill(struct efx_rx_queue *rx_queue); |
53 | 51 | ||
54 | #define EFX_MAX_DMAQ_SIZE 4096UL | 52 | #define EFX_MAX_DMAQ_SIZE 4096UL |
55 | #define EFX_DEFAULT_DMAQ_SIZE 1024UL | 53 | #define EFX_DEFAULT_DMAQ_SIZE 1024UL |
@@ -163,9 +161,9 @@ static inline s32 efx_filter_get_rx_ids(struct efx_nic *efx, | |||
163 | return efx->type->filter_get_rx_ids(efx, priority, buf, size); | 161 | return efx->type->filter_get_rx_ids(efx, priority, buf, size); |
164 | } | 162 | } |
165 | #ifdef CONFIG_RFS_ACCEL | 163 | #ifdef CONFIG_RFS_ACCEL |
166 | extern int efx_filter_rfs(struct net_device *net_dev, const struct sk_buff *skb, | 164 | int efx_filter_rfs(struct net_device *net_dev, const struct sk_buff *skb, |
167 | u16 rxq_index, u32 flow_id); | 165 | u16 rxq_index, u32 flow_id); |
168 | extern bool __efx_filter_rfs_expire(struct efx_nic *efx, unsigned quota); | 166 | bool __efx_filter_rfs_expire(struct efx_nic *efx, unsigned quota); |
169 | static inline void efx_filter_rfs_expire(struct efx_channel *channel) | 167 | static inline void efx_filter_rfs_expire(struct efx_channel *channel) |
170 | { | 168 | { |
171 | if (channel->rfs_filters_added >= 60 && | 169 | if (channel->rfs_filters_added >= 60 && |
@@ -177,50 +175,48 @@ static inline void efx_filter_rfs_expire(struct efx_channel *channel) | |||
177 | static inline void efx_filter_rfs_expire(struct efx_channel *channel) {} | 175 | static inline void efx_filter_rfs_expire(struct efx_channel *channel) {} |
178 | #define efx_filter_rfs_enabled() 0 | 176 | #define efx_filter_rfs_enabled() 0 |
179 | #endif | 177 | #endif |
180 | extern bool efx_filter_is_mc_recipient(const struct efx_filter_spec *spec); | 178 | bool efx_filter_is_mc_recipient(const struct efx_filter_spec *spec); |
181 | 179 | ||
182 | /* Channels */ | 180 | /* Channels */ |
183 | extern int efx_channel_dummy_op_int(struct efx_channel *channel); | 181 | int efx_channel_dummy_op_int(struct efx_channel *channel); |
184 | extern void efx_channel_dummy_op_void(struct efx_channel *channel); | 182 | void efx_channel_dummy_op_void(struct efx_channel *channel); |
185 | extern int | 183 | int efx_realloc_channels(struct efx_nic *efx, u32 rxq_entries, u32 txq_entries); |
186 | efx_realloc_channels(struct efx_nic *efx, u32 rxq_entries, u32 txq_entries); | ||
187 | 184 | ||
188 | /* Ports */ | 185 | /* Ports */ |
189 | extern int efx_reconfigure_port(struct efx_nic *efx); | 186 | int efx_reconfigure_port(struct efx_nic *efx); |
190 | extern int __efx_reconfigure_port(struct efx_nic *efx); | 187 | int __efx_reconfigure_port(struct efx_nic *efx); |
191 | 188 | ||
192 | /* Ethtool support */ | 189 | /* Ethtool support */ |
193 | extern const struct ethtool_ops efx_ethtool_ops; | 190 | extern const struct ethtool_ops efx_ethtool_ops; |
194 | 191 | ||
195 | /* Reset handling */ | 192 | /* Reset handling */ |
196 | extern int efx_reset(struct efx_nic *efx, enum reset_type method); | 193 | int efx_reset(struct efx_nic *efx, enum reset_type method); |
197 | extern void efx_reset_down(struct efx_nic *efx, enum reset_type method); | 194 | void efx_reset_down(struct efx_nic *efx, enum reset_type method); |
198 | extern int efx_reset_up(struct efx_nic *efx, enum reset_type method, bool ok); | 195 | int efx_reset_up(struct efx_nic *efx, enum reset_type method, bool ok); |
199 | extern int efx_try_recovery(struct efx_nic *efx); | 196 | int efx_try_recovery(struct efx_nic *efx); |
200 | 197 | ||
201 | /* Global */ | 198 | /* Global */ |
202 | extern void efx_schedule_reset(struct efx_nic *efx, enum reset_type type); | 199 | void efx_schedule_reset(struct efx_nic *efx, enum reset_type type); |
203 | extern int efx_init_irq_moderation(struct efx_nic *efx, unsigned int tx_usecs, | 200 | int efx_init_irq_moderation(struct efx_nic *efx, unsigned int tx_usecs, |
204 | unsigned int rx_usecs, bool rx_adaptive, | 201 | unsigned int rx_usecs, bool rx_adaptive, |
205 | bool rx_may_override_tx); | 202 | bool rx_may_override_tx); |
206 | extern void efx_get_irq_moderation(struct efx_nic *efx, unsigned int *tx_usecs, | 203 | void efx_get_irq_moderation(struct efx_nic *efx, unsigned int *tx_usecs, |
207 | unsigned int *rx_usecs, bool *rx_adaptive); | 204 | unsigned int *rx_usecs, bool *rx_adaptive); |
208 | 205 | ||
209 | /* Dummy PHY ops for PHY drivers */ | 206 | /* Dummy PHY ops for PHY drivers */ |
210 | extern int efx_port_dummy_op_int(struct efx_nic *efx); | 207 | int efx_port_dummy_op_int(struct efx_nic *efx); |
211 | extern void efx_port_dummy_op_void(struct efx_nic *efx); | 208 | void efx_port_dummy_op_void(struct efx_nic *efx); |
212 | |||
213 | 209 | ||
214 | /* MTD */ | 210 | /* MTD */ |
215 | #ifdef CONFIG_SFC_MTD | 211 | #ifdef CONFIG_SFC_MTD |
216 | extern int efx_mtd_add(struct efx_nic *efx, struct efx_mtd_partition *parts, | 212 | int efx_mtd_add(struct efx_nic *efx, struct efx_mtd_partition *parts, |
217 | size_t n_parts, size_t sizeof_part); | 213 | size_t n_parts, size_t sizeof_part); |
218 | static inline int efx_mtd_probe(struct efx_nic *efx) | 214 | static inline int efx_mtd_probe(struct efx_nic *efx) |
219 | { | 215 | { |
220 | return efx->type->mtd_probe(efx); | 216 | return efx->type->mtd_probe(efx); |
221 | } | 217 | } |
222 | extern void efx_mtd_rename(struct efx_nic *efx); | 218 | void efx_mtd_rename(struct efx_nic *efx); |
223 | extern void efx_mtd_remove(struct efx_nic *efx); | 219 | void efx_mtd_remove(struct efx_nic *efx); |
224 | #else | 220 | #else |
225 | static inline int efx_mtd_probe(struct efx_nic *efx) { return 0; } | 221 | static inline int efx_mtd_probe(struct efx_nic *efx) { return 0; } |
226 | static inline void efx_mtd_rename(struct efx_nic *efx) {} | 222 | static inline void efx_mtd_rename(struct efx_nic *efx) {} |
@@ -242,9 +238,9 @@ static inline void efx_schedule_channel_irq(struct efx_channel *channel) | |||
242 | efx_schedule_channel(channel); | 238 | efx_schedule_channel(channel); |
243 | } | 239 | } |
244 | 240 | ||
245 | extern void efx_link_status_changed(struct efx_nic *efx); | 241 | void efx_link_status_changed(struct efx_nic *efx); |
246 | extern void efx_link_set_advertising(struct efx_nic *efx, u32); | 242 | void efx_link_set_advertising(struct efx_nic *efx, u32); |
247 | extern void efx_link_set_wanted_fc(struct efx_nic *efx, u8); | 243 | void efx_link_set_wanted_fc(struct efx_nic *efx, u8); |
248 | 244 | ||
249 | static inline void efx_device_detach_sync(struct efx_nic *efx) | 245 | static inline void efx_device_detach_sync(struct efx_nic *efx) |
250 | { | 246 | { |
diff --git a/drivers/net/ethernet/sfc/mcdi.h b/drivers/net/ethernet/sfc/mcdi.h index c34d0d4e10ee..656a3277c2b2 100644 --- a/drivers/net/ethernet/sfc/mcdi.h +++ b/drivers/net/ethernet/sfc/mcdi.h | |||
@@ -108,38 +108,35 @@ static inline struct efx_mcdi_mon *efx_mcdi_mon(struct efx_nic *efx) | |||
108 | } | 108 | } |
109 | #endif | 109 | #endif |
110 | 110 | ||
111 | extern int efx_mcdi_init(struct efx_nic *efx); | 111 | int efx_mcdi_init(struct efx_nic *efx); |
112 | extern void efx_mcdi_fini(struct efx_nic *efx); | 112 | void efx_mcdi_fini(struct efx_nic *efx); |
113 | 113 | ||
114 | extern int efx_mcdi_rpc(struct efx_nic *efx, unsigned cmd, | 114 | int efx_mcdi_rpc(struct efx_nic *efx, unsigned cmd, const efx_dword_t *inbuf, |
115 | const efx_dword_t *inbuf, size_t inlen, | 115 | size_t inlen, efx_dword_t *outbuf, size_t outlen, |
116 | size_t *outlen_actual); | ||
117 | |||
118 | int efx_mcdi_rpc_start(struct efx_nic *efx, unsigned cmd, | ||
119 | const efx_dword_t *inbuf, size_t inlen); | ||
120 | int efx_mcdi_rpc_finish(struct efx_nic *efx, unsigned cmd, size_t inlen, | ||
116 | efx_dword_t *outbuf, size_t outlen, | 121 | efx_dword_t *outbuf, size_t outlen, |
117 | size_t *outlen_actual); | 122 | size_t *outlen_actual); |
118 | 123 | ||
119 | extern int efx_mcdi_rpc_start(struct efx_nic *efx, unsigned cmd, | ||
120 | const efx_dword_t *inbuf, size_t inlen); | ||
121 | extern int efx_mcdi_rpc_finish(struct efx_nic *efx, unsigned cmd, size_t inlen, | ||
122 | efx_dword_t *outbuf, size_t outlen, | ||
123 | size_t *outlen_actual); | ||
124 | |||
125 | typedef void efx_mcdi_async_completer(struct efx_nic *efx, | 124 | typedef void efx_mcdi_async_completer(struct efx_nic *efx, |
126 | unsigned long cookie, int rc, | 125 | unsigned long cookie, int rc, |
127 | efx_dword_t *outbuf, | 126 | efx_dword_t *outbuf, |
128 | size_t outlen_actual); | 127 | size_t outlen_actual); |
129 | extern int efx_mcdi_rpc_async(struct efx_nic *efx, unsigned int cmd, | 128 | int efx_mcdi_rpc_async(struct efx_nic *efx, unsigned int cmd, |
130 | const efx_dword_t *inbuf, size_t inlen, | 129 | const efx_dword_t *inbuf, size_t inlen, size_t outlen, |
131 | size_t outlen, | 130 | efx_mcdi_async_completer *complete, |
132 | efx_mcdi_async_completer *complete, | 131 | unsigned long cookie); |
133 | unsigned long cookie); | ||
134 | 132 | ||
135 | extern int efx_mcdi_poll_reboot(struct efx_nic *efx); | 133 | int efx_mcdi_poll_reboot(struct efx_nic *efx); |
136 | extern void efx_mcdi_mode_poll(struct efx_nic *efx); | 134 | void efx_mcdi_mode_poll(struct efx_nic *efx); |
137 | extern void efx_mcdi_mode_event(struct efx_nic *efx); | 135 | void efx_mcdi_mode_event(struct efx_nic *efx); |
138 | extern void efx_mcdi_flush_async(struct efx_nic *efx); | 136 | void efx_mcdi_flush_async(struct efx_nic *efx); |
139 | 137 | ||
140 | extern void efx_mcdi_process_event(struct efx_channel *channel, | 138 | void efx_mcdi_process_event(struct efx_channel *channel, efx_qword_t *event); |
141 | efx_qword_t *event); | 139 | void efx_mcdi_sensor_event(struct efx_nic *efx, efx_qword_t *ev); |
142 | extern void efx_mcdi_sensor_event(struct efx_nic *efx, efx_qword_t *ev); | ||
143 | 140 | ||
144 | /* We expect that 16- and 32-bit fields in MCDI requests and responses | 141 | /* We expect that 16- and 32-bit fields in MCDI requests and responses |
145 | * are appropriately aligned, but 64-bit fields are only | 142 | * are appropriately aligned, but 64-bit fields are only |
@@ -275,55 +272,54 @@ extern void efx_mcdi_sensor_event(struct efx_nic *efx, efx_qword_t *ev); | |||
275 | #define MCDI_EVENT_FIELD(_ev, _field) \ | 272 | #define MCDI_EVENT_FIELD(_ev, _field) \ |
276 | EFX_QWORD_FIELD(_ev, MCDI_EVENT_ ## _field) | 273 | EFX_QWORD_FIELD(_ev, MCDI_EVENT_ ## _field) |
277 | 274 | ||
278 | extern void efx_mcdi_print_fwver(struct efx_nic *efx, char *buf, size_t len); | 275 | void efx_mcdi_print_fwver(struct efx_nic *efx, char *buf, size_t len); |
279 | extern int efx_mcdi_get_board_cfg(struct efx_nic *efx, u8 *mac_address, | 276 | int efx_mcdi_get_board_cfg(struct efx_nic *efx, u8 *mac_address, |
280 | u16 *fw_subtype_list, u32 *capabilities); | 277 | u16 *fw_subtype_list, u32 *capabilities); |
281 | extern int efx_mcdi_log_ctrl(struct efx_nic *efx, bool evq, bool uart, | 278 | int efx_mcdi_log_ctrl(struct efx_nic *efx, bool evq, bool uart, u32 dest_evq); |
282 | u32 dest_evq); | 279 | int efx_mcdi_nvram_types(struct efx_nic *efx, u32 *nvram_types_out); |
283 | extern int efx_mcdi_nvram_types(struct efx_nic *efx, u32 *nvram_types_out); | 280 | int efx_mcdi_nvram_info(struct efx_nic *efx, unsigned int type, |
284 | extern int efx_mcdi_nvram_info(struct efx_nic *efx, unsigned int type, | 281 | size_t *size_out, size_t *erase_size_out, |
285 | size_t *size_out, size_t *erase_size_out, | 282 | bool *protected_out); |
286 | bool *protected_out); | 283 | int efx_mcdi_nvram_test_all(struct efx_nic *efx); |
287 | extern int efx_mcdi_nvram_test_all(struct efx_nic *efx); | 284 | int efx_mcdi_handle_assertion(struct efx_nic *efx); |
288 | extern int efx_mcdi_handle_assertion(struct efx_nic *efx); | 285 | void efx_mcdi_set_id_led(struct efx_nic *efx, enum efx_led_mode mode); |
289 | extern void efx_mcdi_set_id_led(struct efx_nic *efx, enum efx_led_mode mode); | 286 | int efx_mcdi_wol_filter_set_magic(struct efx_nic *efx, const u8 *mac, |
290 | extern int efx_mcdi_wol_filter_set_magic(struct efx_nic *efx, | 287 | int *id_out); |
291 | const u8 *mac, int *id_out); | 288 | int efx_mcdi_wol_filter_get_magic(struct efx_nic *efx, int *id_out); |
292 | extern int efx_mcdi_wol_filter_get_magic(struct efx_nic *efx, int *id_out); | 289 | int efx_mcdi_wol_filter_remove(struct efx_nic *efx, int id); |
293 | extern int efx_mcdi_wol_filter_remove(struct efx_nic *efx, int id); | 290 | int efx_mcdi_wol_filter_reset(struct efx_nic *efx); |
294 | extern int efx_mcdi_wol_filter_reset(struct efx_nic *efx); | 291 | int efx_mcdi_flush_rxqs(struct efx_nic *efx); |
295 | extern int efx_mcdi_flush_rxqs(struct efx_nic *efx); | 292 | int efx_mcdi_port_probe(struct efx_nic *efx); |
296 | extern int efx_mcdi_port_probe(struct efx_nic *efx); | 293 | void efx_mcdi_port_remove(struct efx_nic *efx); |
297 | extern void efx_mcdi_port_remove(struct efx_nic *efx); | 294 | int efx_mcdi_port_reconfigure(struct efx_nic *efx); |
298 | extern int efx_mcdi_port_reconfigure(struct efx_nic *efx); | 295 | int efx_mcdi_port_get_number(struct efx_nic *efx); |
299 | extern int efx_mcdi_port_get_number(struct efx_nic *efx); | 296 | u32 efx_mcdi_phy_get_caps(struct efx_nic *efx); |
300 | extern u32 efx_mcdi_phy_get_caps(struct efx_nic *efx); | 297 | void efx_mcdi_process_link_change(struct efx_nic *efx, efx_qword_t *ev); |
301 | extern void efx_mcdi_process_link_change(struct efx_nic *efx, efx_qword_t *ev); | 298 | int efx_mcdi_set_mac(struct efx_nic *efx); |
302 | extern int efx_mcdi_set_mac(struct efx_nic *efx); | ||
303 | #define EFX_MC_STATS_GENERATION_INVALID ((__force __le64)(-1)) | 299 | #define EFX_MC_STATS_GENERATION_INVALID ((__force __le64)(-1)) |
304 | extern void efx_mcdi_mac_start_stats(struct efx_nic *efx); | 300 | void efx_mcdi_mac_start_stats(struct efx_nic *efx); |
305 | extern void efx_mcdi_mac_stop_stats(struct efx_nic *efx); | 301 | void efx_mcdi_mac_stop_stats(struct efx_nic *efx); |
306 | extern bool efx_mcdi_mac_check_fault(struct efx_nic *efx); | 302 | bool efx_mcdi_mac_check_fault(struct efx_nic *efx); |
307 | extern enum reset_type efx_mcdi_map_reset_reason(enum reset_type reason); | 303 | enum reset_type efx_mcdi_map_reset_reason(enum reset_type reason); |
308 | extern int efx_mcdi_reset(struct efx_nic *efx, enum reset_type method); | 304 | int efx_mcdi_reset(struct efx_nic *efx, enum reset_type method); |
309 | extern int efx_mcdi_set_workaround(struct efx_nic *efx, u32 type, bool enabled); | 305 | int efx_mcdi_set_workaround(struct efx_nic *efx, u32 type, bool enabled); |
310 | 306 | ||
311 | #ifdef CONFIG_SFC_MCDI_MON | 307 | #ifdef CONFIG_SFC_MCDI_MON |
312 | extern int efx_mcdi_mon_probe(struct efx_nic *efx); | 308 | int efx_mcdi_mon_probe(struct efx_nic *efx); |
313 | extern void efx_mcdi_mon_remove(struct efx_nic *efx); | 309 | void efx_mcdi_mon_remove(struct efx_nic *efx); |
314 | #else | 310 | #else |
315 | static inline int efx_mcdi_mon_probe(struct efx_nic *efx) { return 0; } | 311 | static inline int efx_mcdi_mon_probe(struct efx_nic *efx) { return 0; } |
316 | static inline void efx_mcdi_mon_remove(struct efx_nic *efx) {} | 312 | static inline void efx_mcdi_mon_remove(struct efx_nic *efx) {} |
317 | #endif | 313 | #endif |
318 | 314 | ||
319 | #ifdef CONFIG_SFC_MTD | 315 | #ifdef CONFIG_SFC_MTD |
320 | extern int efx_mcdi_mtd_read(struct mtd_info *mtd, loff_t start, | 316 | int efx_mcdi_mtd_read(struct mtd_info *mtd, loff_t start, size_t len, |
321 | size_t len, size_t *retlen, u8 *buffer); | 317 | size_t *retlen, u8 *buffer); |
322 | extern int efx_mcdi_mtd_erase(struct mtd_info *mtd, loff_t start, size_t len); | 318 | int efx_mcdi_mtd_erase(struct mtd_info *mtd, loff_t start, size_t len); |
323 | extern int efx_mcdi_mtd_write(struct mtd_info *mtd, loff_t start, | 319 | int efx_mcdi_mtd_write(struct mtd_info *mtd, loff_t start, size_t len, |
324 | size_t len, size_t *retlen, const u8 *buffer); | 320 | size_t *retlen, const u8 *buffer); |
325 | extern int efx_mcdi_mtd_sync(struct mtd_info *mtd); | 321 | int efx_mcdi_mtd_sync(struct mtd_info *mtd); |
326 | extern void efx_mcdi_mtd_rename(struct efx_mtd_partition *part); | 322 | void efx_mcdi_mtd_rename(struct efx_mtd_partition *part); |
327 | #endif | 323 | #endif |
328 | 324 | ||
329 | #endif /* EFX_MCDI_H */ | 325 | #endif /* EFX_MCDI_H */ |
diff --git a/drivers/net/ethernet/sfc/mdio_10g.h b/drivers/net/ethernet/sfc/mdio_10g.h index 16824fecc5ee..4a2dc4c281b7 100644 --- a/drivers/net/ethernet/sfc/mdio_10g.h +++ b/drivers/net/ethernet/sfc/mdio_10g.h | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | static inline unsigned efx_mdio_id_rev(u32 id) { return id & 0xf; } | 21 | static inline unsigned efx_mdio_id_rev(u32 id) { return id & 0xf; } |
22 | static inline unsigned efx_mdio_id_model(u32 id) { return (id >> 4) & 0x3f; } | 22 | static inline unsigned efx_mdio_id_model(u32 id) { return (id >> 4) & 0x3f; } |
23 | extern unsigned efx_mdio_id_oui(u32 id); | 23 | unsigned efx_mdio_id_oui(u32 id); |
24 | 24 | ||
25 | static inline int efx_mdio_read(struct efx_nic *efx, int devad, int addr) | 25 | static inline int efx_mdio_read(struct efx_nic *efx, int devad, int addr) |
26 | { | 26 | { |
@@ -56,7 +56,7 @@ static inline bool efx_mdio_phyxgxs_lane_sync(struct efx_nic *efx) | |||
56 | return sync; | 56 | return sync; |
57 | } | 57 | } |
58 | 58 | ||
59 | extern const char *efx_mdio_mmd_name(int mmd); | 59 | const char *efx_mdio_mmd_name(int mmd); |
60 | 60 | ||
61 | /* | 61 | /* |
62 | * Reset a specific MMD and wait for reset to clear. | 62 | * Reset a specific MMD and wait for reset to clear. |
@@ -64,30 +64,29 @@ extern const char *efx_mdio_mmd_name(int mmd); | |||
64 | * | 64 | * |
65 | * This function will sleep | 65 | * This function will sleep |
66 | */ | 66 | */ |
67 | extern int efx_mdio_reset_mmd(struct efx_nic *efx, int mmd, | 67 | int efx_mdio_reset_mmd(struct efx_nic *efx, int mmd, int spins, int spintime); |
68 | int spins, int spintime); | ||
69 | 68 | ||
70 | /* As efx_mdio_check_mmd but for multiple MMDs */ | 69 | /* As efx_mdio_check_mmd but for multiple MMDs */ |
71 | int efx_mdio_check_mmds(struct efx_nic *efx, unsigned int mmd_mask); | 70 | int efx_mdio_check_mmds(struct efx_nic *efx, unsigned int mmd_mask); |
72 | 71 | ||
73 | /* Check the link status of specified mmds in bit mask */ | 72 | /* Check the link status of specified mmds in bit mask */ |
74 | extern bool efx_mdio_links_ok(struct efx_nic *efx, unsigned int mmd_mask); | 73 | bool efx_mdio_links_ok(struct efx_nic *efx, unsigned int mmd_mask); |
75 | 74 | ||
76 | /* Generic transmit disable support though PMAPMD */ | 75 | /* Generic transmit disable support though PMAPMD */ |
77 | extern void efx_mdio_transmit_disable(struct efx_nic *efx); | 76 | void efx_mdio_transmit_disable(struct efx_nic *efx); |
78 | 77 | ||
79 | /* Generic part of reconfigure: set/clear loopback bits */ | 78 | /* Generic part of reconfigure: set/clear loopback bits */ |
80 | extern void efx_mdio_phy_reconfigure(struct efx_nic *efx); | 79 | void efx_mdio_phy_reconfigure(struct efx_nic *efx); |
81 | 80 | ||
82 | /* Set the power state of the specified MMDs */ | 81 | /* Set the power state of the specified MMDs */ |
83 | extern void efx_mdio_set_mmds_lpower(struct efx_nic *efx, | 82 | void efx_mdio_set_mmds_lpower(struct efx_nic *efx, int low_power, |
84 | int low_power, unsigned int mmd_mask); | 83 | unsigned int mmd_mask); |
85 | 84 | ||
86 | /* Set (some of) the PHY settings over MDIO */ | 85 | /* Set (some of) the PHY settings over MDIO */ |
87 | extern int efx_mdio_set_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd); | 86 | int efx_mdio_set_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd); |
88 | 87 | ||
89 | /* Push advertising flags and restart autonegotiation */ | 88 | /* Push advertising flags and restart autonegotiation */ |
90 | extern void efx_mdio_an_reconfigure(struct efx_nic *efx); | 89 | void efx_mdio_an_reconfigure(struct efx_nic *efx); |
91 | 90 | ||
92 | /* Get pause parameters from AN if available (otherwise return | 91 | /* Get pause parameters from AN if available (otherwise return |
93 | * requested pause parameters) | 92 | * requested pause parameters) |
@@ -95,8 +94,7 @@ extern void efx_mdio_an_reconfigure(struct efx_nic *efx); | |||
95 | u8 efx_mdio_get_pause(struct efx_nic *efx); | 94 | u8 efx_mdio_get_pause(struct efx_nic *efx); |
96 | 95 | ||
97 | /* Wait for specified MMDs to exit reset within a timeout */ | 96 | /* Wait for specified MMDs to exit reset within a timeout */ |
98 | extern int efx_mdio_wait_reset_mmds(struct efx_nic *efx, | 97 | int efx_mdio_wait_reset_mmds(struct efx_nic *efx, unsigned int mmd_mask); |
99 | unsigned int mmd_mask); | ||
100 | 98 | ||
101 | /* Set or clear flag, debouncing */ | 99 | /* Set or clear flag, debouncing */ |
102 | static inline void | 100 | static inline void |
@@ -107,6 +105,6 @@ efx_mdio_set_flag(struct efx_nic *efx, int devad, int addr, | |||
107 | } | 105 | } |
108 | 106 | ||
109 | /* Liveness self-test for MDIO PHYs */ | 107 | /* Liveness self-test for MDIO PHYs */ |
110 | extern int efx_mdio_test_alive(struct efx_nic *efx); | 108 | int efx_mdio_test_alive(struct efx_nic *efx); |
111 | 109 | ||
112 | #endif /* EFX_MDIO_10G_H */ | 110 | #endif /* EFX_MDIO_10G_H */ |
diff --git a/drivers/net/ethernet/sfc/nic.h b/drivers/net/ethernet/sfc/nic.h index 609f06769245..08883c8edf0e 100644 --- a/drivers/net/ethernet/sfc/nic.h +++ b/drivers/net/ethernet/sfc/nic.h | |||
@@ -30,7 +30,7 @@ static inline int efx_nic_rev(struct efx_nic *efx) | |||
30 | return efx->type->revision; | 30 | return efx->type->revision; |
31 | } | 31 | } |
32 | 32 | ||
33 | extern u32 efx_farch_fpga_ver(struct efx_nic *efx); | 33 | u32 efx_farch_fpga_ver(struct efx_nic *efx); |
34 | 34 | ||
35 | /* NIC has two interlinked PCI functions for the same port. */ | 35 | /* NIC has two interlinked PCI functions for the same port. */ |
36 | static inline bool efx_nic_is_dual_func(struct efx_nic *efx) | 36 | static inline bool efx_nic_is_dual_func(struct efx_nic *efx) |
@@ -497,18 +497,18 @@ static inline unsigned int efx_vf_size(struct efx_nic *efx) | |||
497 | return 1 << efx->vi_scale; | 497 | return 1 << efx->vi_scale; |
498 | } | 498 | } |
499 | 499 | ||
500 | extern int efx_init_sriov(void); | 500 | int efx_init_sriov(void); |
501 | extern void efx_sriov_probe(struct efx_nic *efx); | 501 | void efx_sriov_probe(struct efx_nic *efx); |
502 | extern int efx_sriov_init(struct efx_nic *efx); | 502 | int efx_sriov_init(struct efx_nic *efx); |
503 | extern void efx_sriov_mac_address_changed(struct efx_nic *efx); | 503 | void efx_sriov_mac_address_changed(struct efx_nic *efx); |
504 | extern void efx_sriov_tx_flush_done(struct efx_nic *efx, efx_qword_t *event); | 504 | void efx_sriov_tx_flush_done(struct efx_nic *efx, efx_qword_t *event); |
505 | extern void efx_sriov_rx_flush_done(struct efx_nic *efx, efx_qword_t *event); | 505 | void efx_sriov_rx_flush_done(struct efx_nic *efx, efx_qword_t *event); |
506 | extern void efx_sriov_event(struct efx_channel *channel, efx_qword_t *event); | 506 | void efx_sriov_event(struct efx_channel *channel, efx_qword_t *event); |
507 | extern void efx_sriov_desc_fetch_err(struct efx_nic *efx, unsigned dmaq); | 507 | void efx_sriov_desc_fetch_err(struct efx_nic *efx, unsigned dmaq); |
508 | extern void efx_sriov_flr(struct efx_nic *efx, unsigned flr); | 508 | void efx_sriov_flr(struct efx_nic *efx, unsigned flr); |
509 | extern void efx_sriov_reset(struct efx_nic *efx); | 509 | void efx_sriov_reset(struct efx_nic *efx); |
510 | extern void efx_sriov_fini(struct efx_nic *efx); | 510 | void efx_sriov_fini(struct efx_nic *efx); |
511 | extern void efx_fini_sriov(void); | 511 | void efx_fini_sriov(void); |
512 | 512 | ||
513 | #else | 513 | #else |
514 | 514 | ||
@@ -534,22 +534,20 @@ static inline void efx_fini_sriov(void) {} | |||
534 | 534 | ||
535 | #endif | 535 | #endif |
536 | 536 | ||
537 | extern int efx_sriov_set_vf_mac(struct net_device *dev, int vf, u8 *mac); | 537 | int efx_sriov_set_vf_mac(struct net_device *dev, int vf, u8 *mac); |
538 | extern int efx_sriov_set_vf_vlan(struct net_device *dev, int vf, | 538 | int efx_sriov_set_vf_vlan(struct net_device *dev, int vf, u16 vlan, u8 qos); |
539 | u16 vlan, u8 qos); | 539 | int efx_sriov_get_vf_config(struct net_device *dev, int vf, |
540 | extern int efx_sriov_get_vf_config(struct net_device *dev, int vf, | 540 | struct ifla_vf_info *ivf); |
541 | struct ifla_vf_info *ivf); | 541 | int efx_sriov_set_vf_spoofchk(struct net_device *net_dev, int vf, |
542 | extern int efx_sriov_set_vf_spoofchk(struct net_device *net_dev, int vf, | 542 | bool spoofchk); |
543 | bool spoofchk); | ||
544 | 543 | ||
545 | struct ethtool_ts_info; | 544 | struct ethtool_ts_info; |
546 | extern void efx_ptp_probe(struct efx_nic *efx); | 545 | void efx_ptp_probe(struct efx_nic *efx); |
547 | extern int efx_ptp_ioctl(struct efx_nic *efx, struct ifreq *ifr, int cmd); | 546 | int efx_ptp_ioctl(struct efx_nic *efx, struct ifreq *ifr, int cmd); |
548 | extern void efx_ptp_get_ts_info(struct efx_nic *efx, | 547 | void efx_ptp_get_ts_info(struct efx_nic *efx, struct ethtool_ts_info *ts_info); |
549 | struct ethtool_ts_info *ts_info); | 548 | bool efx_ptp_is_ptp_tx(struct efx_nic *efx, struct sk_buff *skb); |
550 | extern bool efx_ptp_is_ptp_tx(struct efx_nic *efx, struct sk_buff *skb); | 549 | int efx_ptp_tx(struct efx_nic *efx, struct sk_buff *skb); |
551 | extern int efx_ptp_tx(struct efx_nic *efx, struct sk_buff *skb); | 550 | void efx_ptp_event(struct efx_nic *efx, efx_qword_t *ev); |
552 | extern void efx_ptp_event(struct efx_nic *efx, efx_qword_t *ev); | ||
553 | 551 | ||
554 | extern const struct efx_nic_type falcon_a1_nic_type; | 552 | extern const struct efx_nic_type falcon_a1_nic_type; |
555 | extern const struct efx_nic_type falcon_b0_nic_type; | 553 | extern const struct efx_nic_type falcon_b0_nic_type; |
@@ -563,7 +561,7 @@ extern const struct efx_nic_type efx_hunt_a0_nic_type; | |||
563 | ************************************************************************** | 561 | ************************************************************************** |
564 | */ | 562 | */ |
565 | 563 | ||
566 | extern int falcon_probe_board(struct efx_nic *efx, u16 revision_info); | 564 | int falcon_probe_board(struct efx_nic *efx, u16 revision_info); |
567 | 565 | ||
568 | /* TX data path */ | 566 | /* TX data path */ |
569 | static inline int efx_nic_probe_tx(struct efx_tx_queue *tx_queue) | 567 | static inline int efx_nic_probe_tx(struct efx_tx_queue *tx_queue) |
@@ -631,58 +629,58 @@ static inline void efx_nic_eventq_read_ack(struct efx_channel *channel) | |||
631 | { | 629 | { |
632 | channel->efx->type->ev_read_ack(channel); | 630 | channel->efx->type->ev_read_ack(channel); |
633 | } | 631 | } |
634 | extern void efx_nic_event_test_start(struct efx_channel *channel); | 632 | void efx_nic_event_test_start(struct efx_channel *channel); |
635 | 633 | ||
636 | /* Falcon/Siena queue operations */ | 634 | /* Falcon/Siena queue operations */ |
637 | extern int efx_farch_tx_probe(struct efx_tx_queue *tx_queue); | 635 | int efx_farch_tx_probe(struct efx_tx_queue *tx_queue); |
638 | extern void efx_farch_tx_init(struct efx_tx_queue *tx_queue); | 636 | void efx_farch_tx_init(struct efx_tx_queue *tx_queue); |
639 | extern void efx_farch_tx_fini(struct efx_tx_queue *tx_queue); | 637 | void efx_farch_tx_fini(struct efx_tx_queue *tx_queue); |
640 | extern void efx_farch_tx_remove(struct efx_tx_queue *tx_queue); | 638 | void efx_farch_tx_remove(struct efx_tx_queue *tx_queue); |
641 | extern void efx_farch_tx_write(struct efx_tx_queue *tx_queue); | 639 | void efx_farch_tx_write(struct efx_tx_queue *tx_queue); |
642 | extern int efx_farch_rx_probe(struct efx_rx_queue *rx_queue); | 640 | int efx_farch_rx_probe(struct efx_rx_queue *rx_queue); |
643 | extern void efx_farch_rx_init(struct efx_rx_queue *rx_queue); | 641 | void efx_farch_rx_init(struct efx_rx_queue *rx_queue); |
644 | extern void efx_farch_rx_fini(struct efx_rx_queue *rx_queue); | 642 | void efx_farch_rx_fini(struct efx_rx_queue *rx_queue); |
645 | extern void efx_farch_rx_remove(struct efx_rx_queue *rx_queue); | 643 | void efx_farch_rx_remove(struct efx_rx_queue *rx_queue); |
646 | extern void efx_farch_rx_write(struct efx_rx_queue *rx_queue); | 644 | void efx_farch_rx_write(struct efx_rx_queue *rx_queue); |
647 | extern void efx_farch_rx_defer_refill(struct efx_rx_queue *rx_queue); | 645 | void efx_farch_rx_defer_refill(struct efx_rx_queue *rx_queue); |
648 | extern int efx_farch_ev_probe(struct efx_channel *channel); | 646 | int efx_farch_ev_probe(struct efx_channel *channel); |
649 | extern int efx_farch_ev_init(struct efx_channel *channel); | 647 | int efx_farch_ev_init(struct efx_channel *channel); |
650 | extern void efx_farch_ev_fini(struct efx_channel *channel); | 648 | void efx_farch_ev_fini(struct efx_channel *channel); |
651 | extern void efx_farch_ev_remove(struct efx_channel *channel); | 649 | void efx_farch_ev_remove(struct efx_channel *channel); |
652 | extern int efx_farch_ev_process(struct efx_channel *channel, int quota); | 650 | int efx_farch_ev_process(struct efx_channel *channel, int quota); |
653 | extern void efx_farch_ev_read_ack(struct efx_channel *channel); | 651 | void efx_farch_ev_read_ack(struct efx_channel *channel); |
654 | extern void efx_farch_ev_test_generate(struct efx_channel *channel); | 652 | void efx_farch_ev_test_generate(struct efx_channel *channel); |
655 | 653 | ||
656 | /* Falcon/Siena filter operations */ | 654 | /* Falcon/Siena filter operations */ |
657 | extern int efx_farch_filter_table_probe(struct efx_nic *efx); | 655 | int efx_farch_filter_table_probe(struct efx_nic *efx); |
658 | extern void efx_farch_filter_table_restore(struct efx_nic *efx); | 656 | void efx_farch_filter_table_restore(struct efx_nic *efx); |
659 | extern void efx_farch_filter_table_remove(struct efx_nic *efx); | 657 | void efx_farch_filter_table_remove(struct efx_nic *efx); |
660 | extern void efx_farch_filter_update_rx_scatter(struct efx_nic *efx); | 658 | void efx_farch_filter_update_rx_scatter(struct efx_nic *efx); |
661 | extern s32 efx_farch_filter_insert(struct efx_nic *efx, | 659 | s32 efx_farch_filter_insert(struct efx_nic *efx, struct efx_filter_spec *spec, |
662 | struct efx_filter_spec *spec, bool replace); | 660 | bool replace); |
663 | extern int efx_farch_filter_remove_safe(struct efx_nic *efx, | 661 | int efx_farch_filter_remove_safe(struct efx_nic *efx, |
664 | enum efx_filter_priority priority, | 662 | enum efx_filter_priority priority, |
665 | u32 filter_id); | 663 | u32 filter_id); |
666 | extern int efx_farch_filter_get_safe(struct efx_nic *efx, | 664 | int efx_farch_filter_get_safe(struct efx_nic *efx, |
667 | enum efx_filter_priority priority, | 665 | enum efx_filter_priority priority, u32 filter_id, |
668 | u32 filter_id, struct efx_filter_spec *); | 666 | struct efx_filter_spec *); |
669 | extern void efx_farch_filter_clear_rx(struct efx_nic *efx, | 667 | void efx_farch_filter_clear_rx(struct efx_nic *efx, |
670 | enum efx_filter_priority priority); | 668 | enum efx_filter_priority priority); |
671 | extern u32 efx_farch_filter_count_rx_used(struct efx_nic *efx, | 669 | u32 efx_farch_filter_count_rx_used(struct efx_nic *efx, |
672 | enum efx_filter_priority priority); | 670 | enum efx_filter_priority priority); |
673 | extern u32 efx_farch_filter_get_rx_id_limit(struct efx_nic *efx); | 671 | u32 efx_farch_filter_get_rx_id_limit(struct efx_nic *efx); |
674 | extern s32 efx_farch_filter_get_rx_ids(struct efx_nic *efx, | 672 | s32 efx_farch_filter_get_rx_ids(struct efx_nic *efx, |
675 | enum efx_filter_priority priority, | 673 | enum efx_filter_priority priority, u32 *buf, |
676 | u32 *buf, u32 size); | 674 | u32 size); |
677 | #ifdef CONFIG_RFS_ACCEL | 675 | #ifdef CONFIG_RFS_ACCEL |
678 | extern s32 efx_farch_filter_rfs_insert(struct efx_nic *efx, | 676 | s32 efx_farch_filter_rfs_insert(struct efx_nic *efx, |
679 | struct efx_filter_spec *spec); | 677 | struct efx_filter_spec *spec); |
680 | extern bool efx_farch_filter_rfs_expire_one(struct efx_nic *efx, u32 flow_id, | 678 | bool efx_farch_filter_rfs_expire_one(struct efx_nic *efx, u32 flow_id, |
681 | unsigned int index); | 679 | unsigned int index); |
682 | #endif | 680 | #endif |
683 | extern void efx_farch_filter_sync_rx_mode(struct efx_nic *efx); | 681 | void efx_farch_filter_sync_rx_mode(struct efx_nic *efx); |
684 | 682 | ||
685 | extern bool efx_nic_event_present(struct efx_channel *channel); | 683 | bool efx_nic_event_present(struct efx_channel *channel); |
686 | 684 | ||
687 | /* Some statistics are computed as A - B where A and B each increase | 685 | /* Some statistics are computed as A - B where A and B each increase |
688 | * linearly with some hardware counter(s) and the counters are read | 686 | * linearly with some hardware counter(s) and the counters are read |
@@ -703,17 +701,17 @@ static inline void efx_update_diff_stat(u64 *stat, u64 diff) | |||
703 | } | 701 | } |
704 | 702 | ||
705 | /* Interrupts */ | 703 | /* Interrupts */ |
706 | extern int efx_nic_init_interrupt(struct efx_nic *efx); | 704 | int efx_nic_init_interrupt(struct efx_nic *efx); |
707 | extern void efx_nic_irq_test_start(struct efx_nic *efx); | 705 | void efx_nic_irq_test_start(struct efx_nic *efx); |
708 | extern void efx_nic_fini_interrupt(struct efx_nic *efx); | 706 | void efx_nic_fini_interrupt(struct efx_nic *efx); |
709 | 707 | ||
710 | /* Falcon/Siena interrupts */ | 708 | /* Falcon/Siena interrupts */ |
711 | extern void efx_farch_irq_enable_master(struct efx_nic *efx); | 709 | void efx_farch_irq_enable_master(struct efx_nic *efx); |
712 | extern void efx_farch_irq_test_generate(struct efx_nic *efx); | 710 | void efx_farch_irq_test_generate(struct efx_nic *efx); |
713 | extern void efx_farch_irq_disable_master(struct efx_nic *efx); | 711 | void efx_farch_irq_disable_master(struct efx_nic *efx); |
714 | extern irqreturn_t efx_farch_msi_interrupt(int irq, void *dev_id); | 712 | irqreturn_t efx_farch_msi_interrupt(int irq, void *dev_id); |
715 | extern irqreturn_t efx_farch_legacy_interrupt(int irq, void *dev_id); | 713 | irqreturn_t efx_farch_legacy_interrupt(int irq, void *dev_id); |
716 | extern irqreturn_t efx_farch_fatal_interrupt(struct efx_nic *efx); | 714 | irqreturn_t efx_farch_fatal_interrupt(struct efx_nic *efx); |
717 | 715 | ||
718 | static inline int efx_nic_event_test_irq_cpu(struct efx_channel *channel) | 716 | static inline int efx_nic_event_test_irq_cpu(struct efx_channel *channel) |
719 | { | 717 | { |
@@ -725,21 +723,21 @@ static inline int efx_nic_irq_test_irq_cpu(struct efx_nic *efx) | |||
725 | } | 723 | } |
726 | 724 | ||
727 | /* Global Resources */ | 725 | /* Global Resources */ |
728 | extern int efx_nic_flush_queues(struct efx_nic *efx); | 726 | int efx_nic_flush_queues(struct efx_nic *efx); |
729 | extern void siena_prepare_flush(struct efx_nic *efx); | 727 | void siena_prepare_flush(struct efx_nic *efx); |
730 | extern int efx_farch_fini_dmaq(struct efx_nic *efx); | 728 | int efx_farch_fini_dmaq(struct efx_nic *efx); |
731 | extern void siena_finish_flush(struct efx_nic *efx); | 729 | void siena_finish_flush(struct efx_nic *efx); |
732 | extern void falcon_start_nic_stats(struct efx_nic *efx); | 730 | void falcon_start_nic_stats(struct efx_nic *efx); |
733 | extern void falcon_stop_nic_stats(struct efx_nic *efx); | 731 | void falcon_stop_nic_stats(struct efx_nic *efx); |
734 | extern int falcon_reset_xaui(struct efx_nic *efx); | 732 | int falcon_reset_xaui(struct efx_nic *efx); |
735 | extern void efx_farch_dimension_resources(struct efx_nic *efx, unsigned sram_lim_qw); | 733 | void efx_farch_dimension_resources(struct efx_nic *efx, unsigned sram_lim_qw); |
736 | extern void efx_farch_init_common(struct efx_nic *efx); | 734 | void efx_farch_init_common(struct efx_nic *efx); |
737 | extern void efx_ef10_handle_drain_event(struct efx_nic *efx); | 735 | void efx_ef10_handle_drain_event(struct efx_nic *efx); |
738 | static inline void efx_nic_push_rx_indir_table(struct efx_nic *efx) | 736 | static inline void efx_nic_push_rx_indir_table(struct efx_nic *efx) |
739 | { | 737 | { |
740 | efx->type->rx_push_indir_table(efx); | 738 | efx->type->rx_push_indir_table(efx); |
741 | } | 739 | } |
742 | extern void efx_farch_rx_push_indir_table(struct efx_nic *efx); | 740 | void efx_farch_rx_push_indir_table(struct efx_nic *efx); |
743 | 741 | ||
744 | int efx_nic_alloc_buffer(struct efx_nic *efx, struct efx_buffer *buffer, | 742 | int efx_nic_alloc_buffer(struct efx_nic *efx, struct efx_buffer *buffer, |
745 | unsigned int len, gfp_t gfp_flags); | 743 | unsigned int len, gfp_t gfp_flags); |
@@ -750,24 +748,22 @@ struct efx_farch_register_test { | |||
750 | unsigned address; | 748 | unsigned address; |
751 | efx_oword_t mask; | 749 | efx_oword_t mask; |
752 | }; | 750 | }; |
753 | extern int efx_farch_test_registers(struct efx_nic *efx, | 751 | int efx_farch_test_registers(struct efx_nic *efx, |
754 | const struct efx_farch_register_test *regs, | 752 | const struct efx_farch_register_test *regs, |
755 | size_t n_regs); | 753 | size_t n_regs); |
756 | 754 | ||
757 | extern size_t efx_nic_get_regs_len(struct efx_nic *efx); | 755 | size_t efx_nic_get_regs_len(struct efx_nic *efx); |
758 | extern void efx_nic_get_regs(struct efx_nic *efx, void *buf); | 756 | void efx_nic_get_regs(struct efx_nic *efx, void *buf); |
759 | 757 | ||
760 | extern size_t | 758 | size_t efx_nic_describe_stats(const struct efx_hw_stat_desc *desc, size_t count, |
761 | efx_nic_describe_stats(const struct efx_hw_stat_desc *desc, size_t count, | 759 | const unsigned long *mask, u8 *names); |
762 | const unsigned long *mask, u8 *names); | 760 | void efx_nic_update_stats(const struct efx_hw_stat_desc *desc, size_t count, |
763 | extern void | 761 | const unsigned long *mask, u64 *stats, |
764 | efx_nic_update_stats(const struct efx_hw_stat_desc *desc, size_t count, | 762 | const void *dma_buf, bool accumulate); |
765 | const unsigned long *mask, | ||
766 | u64 *stats, const void *dma_buf, bool accumulate); | ||
767 | 763 | ||
768 | #define EFX_MAX_FLUSH_TIME 5000 | 764 | #define EFX_MAX_FLUSH_TIME 5000 |
769 | 765 | ||
770 | extern void efx_farch_generate_event(struct efx_nic *efx, unsigned int evq, | 766 | void efx_farch_generate_event(struct efx_nic *efx, unsigned int evq, |
771 | efx_qword_t *event); | 767 | efx_qword_t *event); |
772 | 768 | ||
773 | #endif /* EFX_NIC_H */ | 769 | #endif /* EFX_NIC_H */ |
diff --git a/drivers/net/ethernet/sfc/phy.h b/drivers/net/ethernet/sfc/phy.h index 45eeb7075156..803bf445c08e 100644 --- a/drivers/net/ethernet/sfc/phy.h +++ b/drivers/net/ethernet/sfc/phy.h | |||
@@ -15,7 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | extern const struct efx_phy_operations falcon_sfx7101_phy_ops; | 16 | extern const struct efx_phy_operations falcon_sfx7101_phy_ops; |
17 | 17 | ||
18 | extern void tenxpress_set_id_led(struct efx_nic *efx, enum efx_led_mode mode); | 18 | void tenxpress_set_id_led(struct efx_nic *efx, enum efx_led_mode mode); |
19 | 19 | ||
20 | /**************************************************************************** | 20 | /**************************************************************************** |
21 | * AMCC/Quake QT202x PHYs | 21 | * AMCC/Quake QT202x PHYs |
@@ -34,7 +34,7 @@ extern const struct efx_phy_operations falcon_qt202x_phy_ops; | |||
34 | #define QUAKE_LED_TXLINK (0) | 34 | #define QUAKE_LED_TXLINK (0) |
35 | #define QUAKE_LED_RXLINK (8) | 35 | #define QUAKE_LED_RXLINK (8) |
36 | 36 | ||
37 | extern void falcon_qt202x_set_led(struct efx_nic *p, int led, int state); | 37 | void falcon_qt202x_set_led(struct efx_nic *p, int led, int state); |
38 | 38 | ||
39 | /**************************************************************************** | 39 | /**************************************************************************** |
40 | * Transwitch CX4 retimer | 40 | * Transwitch CX4 retimer |
@@ -44,7 +44,7 @@ extern const struct efx_phy_operations falcon_txc_phy_ops; | |||
44 | #define TXC_GPIO_DIR_INPUT 0 | 44 | #define TXC_GPIO_DIR_INPUT 0 |
45 | #define TXC_GPIO_DIR_OUTPUT 1 | 45 | #define TXC_GPIO_DIR_OUTPUT 1 |
46 | 46 | ||
47 | extern void falcon_txc_set_gpio_dir(struct efx_nic *efx, int pin, int dir); | 47 | void falcon_txc_set_gpio_dir(struct efx_nic *efx, int pin, int dir); |
48 | extern void falcon_txc_set_gpio_val(struct efx_nic *efx, int pin, int val); | 48 | void falcon_txc_set_gpio_val(struct efx_nic *efx, int pin, int val); |
49 | 49 | ||
50 | #endif | 50 | #endif |
diff --git a/drivers/net/ethernet/sfc/selftest.h b/drivers/net/ethernet/sfc/selftest.h index 87698ae0bf75..a2f4a06ffa4e 100644 --- a/drivers/net/ethernet/sfc/selftest.h +++ b/drivers/net/ethernet/sfc/selftest.h | |||
@@ -43,13 +43,12 @@ struct efx_self_tests { | |||
43 | struct efx_loopback_self_tests loopback[LOOPBACK_TEST_MAX + 1]; | 43 | struct efx_loopback_self_tests loopback[LOOPBACK_TEST_MAX + 1]; |
44 | }; | 44 | }; |
45 | 45 | ||
46 | extern void efx_loopback_rx_packet(struct efx_nic *efx, | 46 | void efx_loopback_rx_packet(struct efx_nic *efx, const char *buf_ptr, |
47 | const char *buf_ptr, int pkt_len); | 47 | int pkt_len); |
48 | extern int efx_selftest(struct efx_nic *efx, | 48 | int efx_selftest(struct efx_nic *efx, struct efx_self_tests *tests, |
49 | struct efx_self_tests *tests, | 49 | unsigned flags); |
50 | unsigned flags); | 50 | void efx_selftest_async_start(struct efx_nic *efx); |
51 | extern void efx_selftest_async_start(struct efx_nic *efx); | 51 | void efx_selftest_async_cancel(struct efx_nic *efx); |
52 | extern void efx_selftest_async_cancel(struct efx_nic *efx); | 52 | void efx_selftest_async_work(struct work_struct *data); |
53 | extern void efx_selftest_async_work(struct work_struct *data); | ||
54 | 53 | ||
55 | #endif /* EFX_SELFTEST_H */ | 54 | #endif /* EFX_SELFTEST_H */ |