aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-09-23 14:37:59 -0400
committerJoe Perches <joe@perches.com>2013-09-24 15:52:53 -0400
commit00aef9867ee9d0de8380c3e65c1ca41698fc9949 (patch)
tree44c50eb9b5cfa9809df0dfdfab6ef00203981e1c /drivers/net/ethernet/sfc
parent8a1a0ae11cbf80cacee40abc9af8a8ef16aaaf36 (diff)
sfc: Remove extern from function prototypes
There are a mix of function prototypes with and without extern in the kernel sources. Standardize on not using extern for function prototypes. Function prototypes don't need to be written with extern. extern is assumed by the compiler. Its use is as unnecessary as using auto to declare automatic/local variables in a block. Signed-off-by: Joe Perches <joe@perches.com>
Diffstat (limited to 'drivers/net/ethernet/sfc')
-rw-r--r--drivers/net/ethernet/sfc/efx.h104
-rw-r--r--drivers/net/ethernet/sfc/mcdi.h120
-rw-r--r--drivers/net/ethernet/sfc/mdio_10g.h26
-rw-r--r--drivers/net/ethernet/sfc/nic.h210
-rw-r--r--drivers/net/ethernet/sfc/phy.h8
-rw-r--r--drivers/net/ethernet/sfc/selftest.h15
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 */
21extern int efx_probe_tx_queue(struct efx_tx_queue *tx_queue); 21int efx_probe_tx_queue(struct efx_tx_queue *tx_queue);
22extern void efx_remove_tx_queue(struct efx_tx_queue *tx_queue); 22void efx_remove_tx_queue(struct efx_tx_queue *tx_queue);
23extern void efx_init_tx_queue(struct efx_tx_queue *tx_queue); 23void efx_init_tx_queue(struct efx_tx_queue *tx_queue);
24extern void efx_init_tx_queue_core_txq(struct efx_tx_queue *tx_queue); 24void efx_init_tx_queue_core_txq(struct efx_tx_queue *tx_queue);
25extern void efx_fini_tx_queue(struct efx_tx_queue *tx_queue); 25void efx_fini_tx_queue(struct efx_tx_queue *tx_queue);
26extern netdev_tx_t 26netdev_tx_t efx_hard_start_xmit(struct sk_buff *skb,
27efx_hard_start_xmit(struct sk_buff *skb, struct net_device *net_dev); 27 struct net_device *net_dev);
28extern netdev_tx_t 28netdev_tx_t efx_enqueue_skb(struct efx_tx_queue *tx_queue, struct sk_buff *skb);
29efx_enqueue_skb(struct efx_tx_queue *tx_queue, struct sk_buff *skb); 29void efx_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index);
30extern void efx_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index); 30int efx_setup_tc(struct net_device *net_dev, u8 num_tc);
31extern int efx_setup_tc(struct net_device *net_dev, u8 num_tc); 31unsigned int efx_tx_max_skb_descs(struct efx_nic *efx);
32extern unsigned int efx_tx_max_skb_descs(struct efx_nic *efx);
33extern unsigned int efx_piobuf_size; 32extern unsigned int efx_piobuf_size;
34 33
35/* RX */ 34/* RX */
36extern void efx_rx_config_page_split(struct efx_nic *efx); 35void efx_rx_config_page_split(struct efx_nic *efx);
37extern int efx_probe_rx_queue(struct efx_rx_queue *rx_queue); 36int efx_probe_rx_queue(struct efx_rx_queue *rx_queue);
38extern void efx_remove_rx_queue(struct efx_rx_queue *rx_queue); 37void efx_remove_rx_queue(struct efx_rx_queue *rx_queue);
39extern void efx_init_rx_queue(struct efx_rx_queue *rx_queue); 38void efx_init_rx_queue(struct efx_rx_queue *rx_queue);
40extern void efx_fini_rx_queue(struct efx_rx_queue *rx_queue); 39void efx_fini_rx_queue(struct efx_rx_queue *rx_queue);
41extern void efx_fast_push_rx_descriptors(struct efx_rx_queue *rx_queue); 40void efx_fast_push_rx_descriptors(struct efx_rx_queue *rx_queue);
42extern void efx_rx_slow_fill(unsigned long context); 41void efx_rx_slow_fill(unsigned long context);
43extern void __efx_rx_packet(struct efx_channel *channel); 42void __efx_rx_packet(struct efx_channel *channel);
44extern void efx_rx_packet(struct efx_rx_queue *rx_queue, 43void 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);
47static inline void efx_rx_flush_packet(struct efx_channel *channel) 45static 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}
52extern void efx_schedule_slow_fill(struct efx_rx_queue *rx_queue); 50void 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
166extern int efx_filter_rfs(struct net_device *net_dev, const struct sk_buff *skb, 164int 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);
168extern bool __efx_filter_rfs_expire(struct efx_nic *efx, unsigned quota); 166bool __efx_filter_rfs_expire(struct efx_nic *efx, unsigned quota);
169static inline void efx_filter_rfs_expire(struct efx_channel *channel) 167static 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)
177static inline void efx_filter_rfs_expire(struct efx_channel *channel) {} 175static 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
180extern bool efx_filter_is_mc_recipient(const struct efx_filter_spec *spec); 178bool efx_filter_is_mc_recipient(const struct efx_filter_spec *spec);
181 179
182/* Channels */ 180/* Channels */
183extern int efx_channel_dummy_op_int(struct efx_channel *channel); 181int efx_channel_dummy_op_int(struct efx_channel *channel);
184extern void efx_channel_dummy_op_void(struct efx_channel *channel); 182void efx_channel_dummy_op_void(struct efx_channel *channel);
185extern int 183int efx_realloc_channels(struct efx_nic *efx, u32 rxq_entries, u32 txq_entries);
186efx_realloc_channels(struct efx_nic *efx, u32 rxq_entries, u32 txq_entries);
187 184
188/* Ports */ 185/* Ports */
189extern int efx_reconfigure_port(struct efx_nic *efx); 186int efx_reconfigure_port(struct efx_nic *efx);
190extern int __efx_reconfigure_port(struct efx_nic *efx); 187int __efx_reconfigure_port(struct efx_nic *efx);
191 188
192/* Ethtool support */ 189/* Ethtool support */
193extern const struct ethtool_ops efx_ethtool_ops; 190extern const struct ethtool_ops efx_ethtool_ops;
194 191
195/* Reset handling */ 192/* Reset handling */
196extern int efx_reset(struct efx_nic *efx, enum reset_type method); 193int efx_reset(struct efx_nic *efx, enum reset_type method);
197extern void efx_reset_down(struct efx_nic *efx, enum reset_type method); 194void efx_reset_down(struct efx_nic *efx, enum reset_type method);
198extern int efx_reset_up(struct efx_nic *efx, enum reset_type method, bool ok); 195int efx_reset_up(struct efx_nic *efx, enum reset_type method, bool ok);
199extern int efx_try_recovery(struct efx_nic *efx); 196int efx_try_recovery(struct efx_nic *efx);
200 197
201/* Global */ 198/* Global */
202extern void efx_schedule_reset(struct efx_nic *efx, enum reset_type type); 199void efx_schedule_reset(struct efx_nic *efx, enum reset_type type);
203extern int efx_init_irq_moderation(struct efx_nic *efx, unsigned int tx_usecs, 200int 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);
206extern void efx_get_irq_moderation(struct efx_nic *efx, unsigned int *tx_usecs, 203void 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 */
210extern int efx_port_dummy_op_int(struct efx_nic *efx); 207int efx_port_dummy_op_int(struct efx_nic *efx);
211extern void efx_port_dummy_op_void(struct efx_nic *efx); 208void 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
216extern int efx_mtd_add(struct efx_nic *efx, struct efx_mtd_partition *parts, 212int 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);
218static inline int efx_mtd_probe(struct efx_nic *efx) 214static 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}
222extern void efx_mtd_rename(struct efx_nic *efx); 218void efx_mtd_rename(struct efx_nic *efx);
223extern void efx_mtd_remove(struct efx_nic *efx); 219void efx_mtd_remove(struct efx_nic *efx);
224#else 220#else
225static inline int efx_mtd_probe(struct efx_nic *efx) { return 0; } 221static inline int efx_mtd_probe(struct efx_nic *efx) { return 0; }
226static inline void efx_mtd_rename(struct efx_nic *efx) {} 222static 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
245extern void efx_link_status_changed(struct efx_nic *efx); 241void efx_link_status_changed(struct efx_nic *efx);
246extern void efx_link_set_advertising(struct efx_nic *efx, u32); 242void efx_link_set_advertising(struct efx_nic *efx, u32);
247extern void efx_link_set_wanted_fc(struct efx_nic *efx, u8); 243void efx_link_set_wanted_fc(struct efx_nic *efx, u8);
248 244
249static inline void efx_device_detach_sync(struct efx_nic *efx) 245static 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
111extern int efx_mcdi_init(struct efx_nic *efx); 111int efx_mcdi_init(struct efx_nic *efx);
112extern void efx_mcdi_fini(struct efx_nic *efx); 112void efx_mcdi_fini(struct efx_nic *efx);
113 113
114extern int efx_mcdi_rpc(struct efx_nic *efx, unsigned cmd, 114int 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
118int efx_mcdi_rpc_start(struct efx_nic *efx, unsigned cmd,
119 const efx_dword_t *inbuf, size_t inlen);
120int 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
119extern int efx_mcdi_rpc_start(struct efx_nic *efx, unsigned cmd,
120 const efx_dword_t *inbuf, size_t inlen);
121extern 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
125typedef void efx_mcdi_async_completer(struct efx_nic *efx, 124typedef 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);
129extern int efx_mcdi_rpc_async(struct efx_nic *efx, unsigned int cmd, 128int 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
135extern int efx_mcdi_poll_reboot(struct efx_nic *efx); 133int efx_mcdi_poll_reboot(struct efx_nic *efx);
136extern void efx_mcdi_mode_poll(struct efx_nic *efx); 134void efx_mcdi_mode_poll(struct efx_nic *efx);
137extern void efx_mcdi_mode_event(struct efx_nic *efx); 135void efx_mcdi_mode_event(struct efx_nic *efx);
138extern void efx_mcdi_flush_async(struct efx_nic *efx); 136void efx_mcdi_flush_async(struct efx_nic *efx);
139 137
140extern void efx_mcdi_process_event(struct efx_channel *channel, 138void efx_mcdi_process_event(struct efx_channel *channel, efx_qword_t *event);
141 efx_qword_t *event); 139void efx_mcdi_sensor_event(struct efx_nic *efx, efx_qword_t *ev);
142extern 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
278extern void efx_mcdi_print_fwver(struct efx_nic *efx, char *buf, size_t len); 275void efx_mcdi_print_fwver(struct efx_nic *efx, char *buf, size_t len);
279extern int efx_mcdi_get_board_cfg(struct efx_nic *efx, u8 *mac_address, 276int 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);
281extern int efx_mcdi_log_ctrl(struct efx_nic *efx, bool evq, bool uart, 278int efx_mcdi_log_ctrl(struct efx_nic *efx, bool evq, bool uart, u32 dest_evq);
282 u32 dest_evq); 279int efx_mcdi_nvram_types(struct efx_nic *efx, u32 *nvram_types_out);
283extern int efx_mcdi_nvram_types(struct efx_nic *efx, u32 *nvram_types_out); 280int efx_mcdi_nvram_info(struct efx_nic *efx, unsigned int type,
284extern 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); 283int efx_mcdi_nvram_test_all(struct efx_nic *efx);
287extern int efx_mcdi_nvram_test_all(struct efx_nic *efx); 284int efx_mcdi_handle_assertion(struct efx_nic *efx);
288extern int efx_mcdi_handle_assertion(struct efx_nic *efx); 285void efx_mcdi_set_id_led(struct efx_nic *efx, enum efx_led_mode mode);
289extern void efx_mcdi_set_id_led(struct efx_nic *efx, enum efx_led_mode mode); 286int efx_mcdi_wol_filter_set_magic(struct efx_nic *efx, const u8 *mac,
290extern int efx_mcdi_wol_filter_set_magic(struct efx_nic *efx, 287 int *id_out);
291 const u8 *mac, int *id_out); 288int efx_mcdi_wol_filter_get_magic(struct efx_nic *efx, int *id_out);
292extern int efx_mcdi_wol_filter_get_magic(struct efx_nic *efx, int *id_out); 289int efx_mcdi_wol_filter_remove(struct efx_nic *efx, int id);
293extern int efx_mcdi_wol_filter_remove(struct efx_nic *efx, int id); 290int efx_mcdi_wol_filter_reset(struct efx_nic *efx);
294extern int efx_mcdi_wol_filter_reset(struct efx_nic *efx); 291int efx_mcdi_flush_rxqs(struct efx_nic *efx);
295extern int efx_mcdi_flush_rxqs(struct efx_nic *efx); 292int efx_mcdi_port_probe(struct efx_nic *efx);
296extern int efx_mcdi_port_probe(struct efx_nic *efx); 293void efx_mcdi_port_remove(struct efx_nic *efx);
297extern void efx_mcdi_port_remove(struct efx_nic *efx); 294int efx_mcdi_port_reconfigure(struct efx_nic *efx);
298extern int efx_mcdi_port_reconfigure(struct efx_nic *efx); 295int efx_mcdi_port_get_number(struct efx_nic *efx);
299extern int efx_mcdi_port_get_number(struct efx_nic *efx); 296u32 efx_mcdi_phy_get_caps(struct efx_nic *efx);
300extern u32 efx_mcdi_phy_get_caps(struct efx_nic *efx); 297void efx_mcdi_process_link_change(struct efx_nic *efx, efx_qword_t *ev);
301extern void efx_mcdi_process_link_change(struct efx_nic *efx, efx_qword_t *ev); 298int efx_mcdi_set_mac(struct efx_nic *efx);
302extern 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))
304extern void efx_mcdi_mac_start_stats(struct efx_nic *efx); 300void efx_mcdi_mac_start_stats(struct efx_nic *efx);
305extern void efx_mcdi_mac_stop_stats(struct efx_nic *efx); 301void efx_mcdi_mac_stop_stats(struct efx_nic *efx);
306extern bool efx_mcdi_mac_check_fault(struct efx_nic *efx); 302bool efx_mcdi_mac_check_fault(struct efx_nic *efx);
307extern enum reset_type efx_mcdi_map_reset_reason(enum reset_type reason); 303enum reset_type efx_mcdi_map_reset_reason(enum reset_type reason);
308extern int efx_mcdi_reset(struct efx_nic *efx, enum reset_type method); 304int efx_mcdi_reset(struct efx_nic *efx, enum reset_type method);
309extern int efx_mcdi_set_workaround(struct efx_nic *efx, u32 type, bool enabled); 305int 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
312extern int efx_mcdi_mon_probe(struct efx_nic *efx); 308int efx_mcdi_mon_probe(struct efx_nic *efx);
313extern void efx_mcdi_mon_remove(struct efx_nic *efx); 309void efx_mcdi_mon_remove(struct efx_nic *efx);
314#else 310#else
315static inline int efx_mcdi_mon_probe(struct efx_nic *efx) { return 0; } 311static inline int efx_mcdi_mon_probe(struct efx_nic *efx) { return 0; }
316static inline void efx_mcdi_mon_remove(struct efx_nic *efx) {} 312static 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
320extern int efx_mcdi_mtd_read(struct mtd_info *mtd, loff_t start, 316int 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);
322extern int efx_mcdi_mtd_erase(struct mtd_info *mtd, loff_t start, size_t len); 318int efx_mcdi_mtd_erase(struct mtd_info *mtd, loff_t start, size_t len);
323extern int efx_mcdi_mtd_write(struct mtd_info *mtd, loff_t start, 319int 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);
325extern int efx_mcdi_mtd_sync(struct mtd_info *mtd); 321int efx_mcdi_mtd_sync(struct mtd_info *mtd);
326extern void efx_mcdi_mtd_rename(struct efx_mtd_partition *part); 322void 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
21static inline unsigned efx_mdio_id_rev(u32 id) { return id & 0xf; } 21static inline unsigned efx_mdio_id_rev(u32 id) { return id & 0xf; }
22static inline unsigned efx_mdio_id_model(u32 id) { return (id >> 4) & 0x3f; } 22static inline unsigned efx_mdio_id_model(u32 id) { return (id >> 4) & 0x3f; }
23extern unsigned efx_mdio_id_oui(u32 id); 23unsigned efx_mdio_id_oui(u32 id);
24 24
25static inline int efx_mdio_read(struct efx_nic *efx, int devad, int addr) 25static 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
59extern const char *efx_mdio_mmd_name(int mmd); 59const 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 */
67extern int efx_mdio_reset_mmd(struct efx_nic *efx, int mmd, 67int 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 */
71int efx_mdio_check_mmds(struct efx_nic *efx, unsigned int mmd_mask); 70int 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 */
74extern bool efx_mdio_links_ok(struct efx_nic *efx, unsigned int mmd_mask); 73bool 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 */
77extern void efx_mdio_transmit_disable(struct efx_nic *efx); 76void 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 */
80extern void efx_mdio_phy_reconfigure(struct efx_nic *efx); 79void 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 */
83extern void efx_mdio_set_mmds_lpower(struct efx_nic *efx, 82void 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 */
87extern int efx_mdio_set_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd); 86int 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 */
90extern void efx_mdio_an_reconfigure(struct efx_nic *efx); 89void 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);
95u8 efx_mdio_get_pause(struct efx_nic *efx); 94u8 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 */
98extern int efx_mdio_wait_reset_mmds(struct efx_nic *efx, 97int 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 */
102static inline void 100static 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 */
110extern int efx_mdio_test_alive(struct efx_nic *efx); 108int 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
33extern u32 efx_farch_fpga_ver(struct efx_nic *efx); 33u32 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. */
36static inline bool efx_nic_is_dual_func(struct efx_nic *efx) 36static 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
500extern int efx_init_sriov(void); 500int efx_init_sriov(void);
501extern void efx_sriov_probe(struct efx_nic *efx); 501void efx_sriov_probe(struct efx_nic *efx);
502extern int efx_sriov_init(struct efx_nic *efx); 502int efx_sriov_init(struct efx_nic *efx);
503extern void efx_sriov_mac_address_changed(struct efx_nic *efx); 503void efx_sriov_mac_address_changed(struct efx_nic *efx);
504extern void efx_sriov_tx_flush_done(struct efx_nic *efx, efx_qword_t *event); 504void efx_sriov_tx_flush_done(struct efx_nic *efx, efx_qword_t *event);
505extern void efx_sriov_rx_flush_done(struct efx_nic *efx, efx_qword_t *event); 505void efx_sriov_rx_flush_done(struct efx_nic *efx, efx_qword_t *event);
506extern void efx_sriov_event(struct efx_channel *channel, efx_qword_t *event); 506void efx_sriov_event(struct efx_channel *channel, efx_qword_t *event);
507extern void efx_sriov_desc_fetch_err(struct efx_nic *efx, unsigned dmaq); 507void efx_sriov_desc_fetch_err(struct efx_nic *efx, unsigned dmaq);
508extern void efx_sriov_flr(struct efx_nic *efx, unsigned flr); 508void efx_sriov_flr(struct efx_nic *efx, unsigned flr);
509extern void efx_sriov_reset(struct efx_nic *efx); 509void efx_sriov_reset(struct efx_nic *efx);
510extern void efx_sriov_fini(struct efx_nic *efx); 510void efx_sriov_fini(struct efx_nic *efx);
511extern void efx_fini_sriov(void); 511void 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
537extern int efx_sriov_set_vf_mac(struct net_device *dev, int vf, u8 *mac); 537int efx_sriov_set_vf_mac(struct net_device *dev, int vf, u8 *mac);
538extern int efx_sriov_set_vf_vlan(struct net_device *dev, int vf, 538int efx_sriov_set_vf_vlan(struct net_device *dev, int vf, u16 vlan, u8 qos);
539 u16 vlan, u8 qos); 539int efx_sriov_get_vf_config(struct net_device *dev, int vf,
540extern int efx_sriov_get_vf_config(struct net_device *dev, int vf, 540 struct ifla_vf_info *ivf);
541 struct ifla_vf_info *ivf); 541int efx_sriov_set_vf_spoofchk(struct net_device *net_dev, int vf,
542extern int efx_sriov_set_vf_spoofchk(struct net_device *net_dev, int vf, 542 bool spoofchk);
543 bool spoofchk);
544 543
545struct ethtool_ts_info; 544struct ethtool_ts_info;
546extern void efx_ptp_probe(struct efx_nic *efx); 545void efx_ptp_probe(struct efx_nic *efx);
547extern int efx_ptp_ioctl(struct efx_nic *efx, struct ifreq *ifr, int cmd); 546int efx_ptp_ioctl(struct efx_nic *efx, struct ifreq *ifr, int cmd);
548extern void efx_ptp_get_ts_info(struct efx_nic *efx, 547void efx_ptp_get_ts_info(struct efx_nic *efx, struct ethtool_ts_info *ts_info);
549 struct ethtool_ts_info *ts_info); 548bool efx_ptp_is_ptp_tx(struct efx_nic *efx, struct sk_buff *skb);
550extern bool efx_ptp_is_ptp_tx(struct efx_nic *efx, struct sk_buff *skb); 549int efx_ptp_tx(struct efx_nic *efx, struct sk_buff *skb);
551extern int efx_ptp_tx(struct efx_nic *efx, struct sk_buff *skb); 550void efx_ptp_event(struct efx_nic *efx, efx_qword_t *ev);
552extern void efx_ptp_event(struct efx_nic *efx, efx_qword_t *ev);
553 551
554extern const struct efx_nic_type falcon_a1_nic_type; 552extern const struct efx_nic_type falcon_a1_nic_type;
555extern const struct efx_nic_type falcon_b0_nic_type; 553extern 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
566extern int falcon_probe_board(struct efx_nic *efx, u16 revision_info); 564int falcon_probe_board(struct efx_nic *efx, u16 revision_info);
567 565
568/* TX data path */ 566/* TX data path */
569static inline int efx_nic_probe_tx(struct efx_tx_queue *tx_queue) 567static 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}
634extern void efx_nic_event_test_start(struct efx_channel *channel); 632void efx_nic_event_test_start(struct efx_channel *channel);
635 633
636/* Falcon/Siena queue operations */ 634/* Falcon/Siena queue operations */
637extern int efx_farch_tx_probe(struct efx_tx_queue *tx_queue); 635int efx_farch_tx_probe(struct efx_tx_queue *tx_queue);
638extern void efx_farch_tx_init(struct efx_tx_queue *tx_queue); 636void efx_farch_tx_init(struct efx_tx_queue *tx_queue);
639extern void efx_farch_tx_fini(struct efx_tx_queue *tx_queue); 637void efx_farch_tx_fini(struct efx_tx_queue *tx_queue);
640extern void efx_farch_tx_remove(struct efx_tx_queue *tx_queue); 638void efx_farch_tx_remove(struct efx_tx_queue *tx_queue);
641extern void efx_farch_tx_write(struct efx_tx_queue *tx_queue); 639void efx_farch_tx_write(struct efx_tx_queue *tx_queue);
642extern int efx_farch_rx_probe(struct efx_rx_queue *rx_queue); 640int efx_farch_rx_probe(struct efx_rx_queue *rx_queue);
643extern void efx_farch_rx_init(struct efx_rx_queue *rx_queue); 641void efx_farch_rx_init(struct efx_rx_queue *rx_queue);
644extern void efx_farch_rx_fini(struct efx_rx_queue *rx_queue); 642void efx_farch_rx_fini(struct efx_rx_queue *rx_queue);
645extern void efx_farch_rx_remove(struct efx_rx_queue *rx_queue); 643void efx_farch_rx_remove(struct efx_rx_queue *rx_queue);
646extern void efx_farch_rx_write(struct efx_rx_queue *rx_queue); 644void efx_farch_rx_write(struct efx_rx_queue *rx_queue);
647extern void efx_farch_rx_defer_refill(struct efx_rx_queue *rx_queue); 645void efx_farch_rx_defer_refill(struct efx_rx_queue *rx_queue);
648extern int efx_farch_ev_probe(struct efx_channel *channel); 646int efx_farch_ev_probe(struct efx_channel *channel);
649extern int efx_farch_ev_init(struct efx_channel *channel); 647int efx_farch_ev_init(struct efx_channel *channel);
650extern void efx_farch_ev_fini(struct efx_channel *channel); 648void efx_farch_ev_fini(struct efx_channel *channel);
651extern void efx_farch_ev_remove(struct efx_channel *channel); 649void efx_farch_ev_remove(struct efx_channel *channel);
652extern int efx_farch_ev_process(struct efx_channel *channel, int quota); 650int efx_farch_ev_process(struct efx_channel *channel, int quota);
653extern void efx_farch_ev_read_ack(struct efx_channel *channel); 651void efx_farch_ev_read_ack(struct efx_channel *channel);
654extern void efx_farch_ev_test_generate(struct efx_channel *channel); 652void efx_farch_ev_test_generate(struct efx_channel *channel);
655 653
656/* Falcon/Siena filter operations */ 654/* Falcon/Siena filter operations */
657extern int efx_farch_filter_table_probe(struct efx_nic *efx); 655int efx_farch_filter_table_probe(struct efx_nic *efx);
658extern void efx_farch_filter_table_restore(struct efx_nic *efx); 656void efx_farch_filter_table_restore(struct efx_nic *efx);
659extern void efx_farch_filter_table_remove(struct efx_nic *efx); 657void efx_farch_filter_table_remove(struct efx_nic *efx);
660extern void efx_farch_filter_update_rx_scatter(struct efx_nic *efx); 658void efx_farch_filter_update_rx_scatter(struct efx_nic *efx);
661extern s32 efx_farch_filter_insert(struct efx_nic *efx, 659s32 efx_farch_filter_insert(struct efx_nic *efx, struct efx_filter_spec *spec,
662 struct efx_filter_spec *spec, bool replace); 660 bool replace);
663extern int efx_farch_filter_remove_safe(struct efx_nic *efx, 661int 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);
666extern int efx_farch_filter_get_safe(struct efx_nic *efx, 664int 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 *);
669extern void efx_farch_filter_clear_rx(struct efx_nic *efx, 667void efx_farch_filter_clear_rx(struct efx_nic *efx,
670 enum efx_filter_priority priority); 668 enum efx_filter_priority priority);
671extern u32 efx_farch_filter_count_rx_used(struct efx_nic *efx, 669u32 efx_farch_filter_count_rx_used(struct efx_nic *efx,
672 enum efx_filter_priority priority); 670 enum efx_filter_priority priority);
673extern u32 efx_farch_filter_get_rx_id_limit(struct efx_nic *efx); 671u32 efx_farch_filter_get_rx_id_limit(struct efx_nic *efx);
674extern s32 efx_farch_filter_get_rx_ids(struct efx_nic *efx, 672s32 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
678extern s32 efx_farch_filter_rfs_insert(struct efx_nic *efx, 676s32 efx_farch_filter_rfs_insert(struct efx_nic *efx,
679 struct efx_filter_spec *spec); 677 struct efx_filter_spec *spec);
680extern bool efx_farch_filter_rfs_expire_one(struct efx_nic *efx, u32 flow_id, 678bool 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
683extern void efx_farch_filter_sync_rx_mode(struct efx_nic *efx); 681void efx_farch_filter_sync_rx_mode(struct efx_nic *efx);
684 682
685extern bool efx_nic_event_present(struct efx_channel *channel); 683bool 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 */
706extern int efx_nic_init_interrupt(struct efx_nic *efx); 704int efx_nic_init_interrupt(struct efx_nic *efx);
707extern void efx_nic_irq_test_start(struct efx_nic *efx); 705void efx_nic_irq_test_start(struct efx_nic *efx);
708extern void efx_nic_fini_interrupt(struct efx_nic *efx); 706void efx_nic_fini_interrupt(struct efx_nic *efx);
709 707
710/* Falcon/Siena interrupts */ 708/* Falcon/Siena interrupts */
711extern void efx_farch_irq_enable_master(struct efx_nic *efx); 709void efx_farch_irq_enable_master(struct efx_nic *efx);
712extern void efx_farch_irq_test_generate(struct efx_nic *efx); 710void efx_farch_irq_test_generate(struct efx_nic *efx);
713extern void efx_farch_irq_disable_master(struct efx_nic *efx); 711void efx_farch_irq_disable_master(struct efx_nic *efx);
714extern irqreturn_t efx_farch_msi_interrupt(int irq, void *dev_id); 712irqreturn_t efx_farch_msi_interrupt(int irq, void *dev_id);
715extern irqreturn_t efx_farch_legacy_interrupt(int irq, void *dev_id); 713irqreturn_t efx_farch_legacy_interrupt(int irq, void *dev_id);
716extern irqreturn_t efx_farch_fatal_interrupt(struct efx_nic *efx); 714irqreturn_t efx_farch_fatal_interrupt(struct efx_nic *efx);
717 715
718static inline int efx_nic_event_test_irq_cpu(struct efx_channel *channel) 716static 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 */
728extern int efx_nic_flush_queues(struct efx_nic *efx); 726int efx_nic_flush_queues(struct efx_nic *efx);
729extern void siena_prepare_flush(struct efx_nic *efx); 727void siena_prepare_flush(struct efx_nic *efx);
730extern int efx_farch_fini_dmaq(struct efx_nic *efx); 728int efx_farch_fini_dmaq(struct efx_nic *efx);
731extern void siena_finish_flush(struct efx_nic *efx); 729void siena_finish_flush(struct efx_nic *efx);
732extern void falcon_start_nic_stats(struct efx_nic *efx); 730void falcon_start_nic_stats(struct efx_nic *efx);
733extern void falcon_stop_nic_stats(struct efx_nic *efx); 731void falcon_stop_nic_stats(struct efx_nic *efx);
734extern int falcon_reset_xaui(struct efx_nic *efx); 732int falcon_reset_xaui(struct efx_nic *efx);
735extern void efx_farch_dimension_resources(struct efx_nic *efx, unsigned sram_lim_qw); 733void efx_farch_dimension_resources(struct efx_nic *efx, unsigned sram_lim_qw);
736extern void efx_farch_init_common(struct efx_nic *efx); 734void efx_farch_init_common(struct efx_nic *efx);
737extern void efx_ef10_handle_drain_event(struct efx_nic *efx); 735void efx_ef10_handle_drain_event(struct efx_nic *efx);
738static inline void efx_nic_push_rx_indir_table(struct efx_nic *efx) 736static 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}
742extern void efx_farch_rx_push_indir_table(struct efx_nic *efx); 740void efx_farch_rx_push_indir_table(struct efx_nic *efx);
743 741
744int efx_nic_alloc_buffer(struct efx_nic *efx, struct efx_buffer *buffer, 742int 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};
753extern int efx_farch_test_registers(struct efx_nic *efx, 751int 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
757extern size_t efx_nic_get_regs_len(struct efx_nic *efx); 755size_t efx_nic_get_regs_len(struct efx_nic *efx);
758extern void efx_nic_get_regs(struct efx_nic *efx, void *buf); 756void efx_nic_get_regs(struct efx_nic *efx, void *buf);
759 757
760extern size_t 758size_t efx_nic_describe_stats(const struct efx_hw_stat_desc *desc, size_t count,
761efx_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); 760void efx_nic_update_stats(const struct efx_hw_stat_desc *desc, size_t count,
763extern void 761 const unsigned long *mask, u64 *stats,
764efx_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
770extern void efx_farch_generate_event(struct efx_nic *efx, unsigned int evq, 766void 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 */
16extern const struct efx_phy_operations falcon_sfx7101_phy_ops; 16extern const struct efx_phy_operations falcon_sfx7101_phy_ops;
17 17
18extern void tenxpress_set_id_led(struct efx_nic *efx, enum efx_led_mode mode); 18void 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
37extern void falcon_qt202x_set_led(struct efx_nic *p, int led, int state); 37void 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
47extern void falcon_txc_set_gpio_dir(struct efx_nic *efx, int pin, int dir); 47void falcon_txc_set_gpio_dir(struct efx_nic *efx, int pin, int dir);
48extern void falcon_txc_set_gpio_val(struct efx_nic *efx, int pin, int val); 48void 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
46extern void efx_loopback_rx_packet(struct efx_nic *efx, 46void efx_loopback_rx_packet(struct efx_nic *efx, const char *buf_ptr,
47 const char *buf_ptr, int pkt_len); 47 int pkt_len);
48extern int efx_selftest(struct efx_nic *efx, 48int efx_selftest(struct efx_nic *efx, struct efx_self_tests *tests,
49 struct efx_self_tests *tests, 49 unsigned flags);
50 unsigned flags); 50void efx_selftest_async_start(struct efx_nic *efx);
51extern void efx_selftest_async_start(struct efx_nic *efx); 51void efx_selftest_async_cancel(struct efx_nic *efx);
52extern void efx_selftest_async_cancel(struct efx_nic *efx); 52void efx_selftest_async_work(struct work_struct *data);
53extern void efx_selftest_async_work(struct work_struct *data);
54 53
55#endif /* EFX_SELFTEST_H */ 54#endif /* EFX_SELFTEST_H */