aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/efx.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/sfc/efx.h')
-rw-r--r--drivers/net/ethernet/sfc/efx.h105
1 files changed, 51 insertions, 54 deletions
diff --git a/drivers/net/ethernet/sfc/efx.h b/drivers/net/ethernet/sfc/efx.h
index 34d00f5771fe..b8235ee5d7d7 100644
--- a/drivers/net/ethernet/sfc/efx.h
+++ b/drivers/net/ethernet/sfc/efx.h
@@ -18,37 +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); 32extern unsigned int efx_piobuf_size;
33 33
34/* RX */ 34/* RX */
35extern void efx_rx_config_page_split(struct efx_nic *efx); 35void efx_rx_config_page_split(struct efx_nic *efx);
36extern int efx_probe_rx_queue(struct efx_rx_queue *rx_queue); 36int efx_probe_rx_queue(struct efx_rx_queue *rx_queue);
37extern void efx_remove_rx_queue(struct efx_rx_queue *rx_queue); 37void efx_remove_rx_queue(struct efx_rx_queue *rx_queue);
38extern void efx_init_rx_queue(struct efx_rx_queue *rx_queue); 38void efx_init_rx_queue(struct efx_rx_queue *rx_queue);
39extern void efx_fini_rx_queue(struct efx_rx_queue *rx_queue); 39void efx_fini_rx_queue(struct efx_rx_queue *rx_queue);
40extern void efx_fast_push_rx_descriptors(struct efx_rx_queue *rx_queue); 40void efx_fast_push_rx_descriptors(struct efx_rx_queue *rx_queue);
41extern void efx_rx_slow_fill(unsigned long context); 41void efx_rx_slow_fill(unsigned long context);
42extern void __efx_rx_packet(struct efx_channel *channel); 42void __efx_rx_packet(struct efx_channel *channel);
43extern void efx_rx_packet(struct efx_rx_queue *rx_queue, 43void efx_rx_packet(struct efx_rx_queue *rx_queue, unsigned int index,
44 unsigned int index, unsigned int n_frags, 44 unsigned int n_frags, unsigned int len, u16 flags);
45 unsigned int len, u16 flags);
46static inline void efx_rx_flush_packet(struct efx_channel *channel) 45static inline void efx_rx_flush_packet(struct efx_channel *channel)
47{ 46{
48 if (channel->rx_pkt_n_frags) 47 if (channel->rx_pkt_n_frags)
49 __efx_rx_packet(channel); 48 __efx_rx_packet(channel);
50} 49}
51extern void efx_schedule_slow_fill(struct efx_rx_queue *rx_queue); 50void efx_schedule_slow_fill(struct efx_rx_queue *rx_queue);
52 51
53#define EFX_MAX_DMAQ_SIZE 4096UL 52#define EFX_MAX_DMAQ_SIZE 4096UL
54#define EFX_DEFAULT_DMAQ_SIZE 1024UL 53#define EFX_DEFAULT_DMAQ_SIZE 1024UL
@@ -162,9 +161,9 @@ static inline s32 efx_filter_get_rx_ids(struct efx_nic *efx,
162 return efx->type->filter_get_rx_ids(efx, priority, buf, size); 161 return efx->type->filter_get_rx_ids(efx, priority, buf, size);
163} 162}
164#ifdef CONFIG_RFS_ACCEL 163#ifdef CONFIG_RFS_ACCEL
165extern 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,
166 u16 rxq_index, u32 flow_id); 165 u16 rxq_index, u32 flow_id);
167extern bool __efx_filter_rfs_expire(struct efx_nic *efx, unsigned quota); 166bool __efx_filter_rfs_expire(struct efx_nic *efx, unsigned quota);
168static inline void efx_filter_rfs_expire(struct efx_channel *channel) 167static inline void efx_filter_rfs_expire(struct efx_channel *channel)
169{ 168{
170 if (channel->rfs_filters_added >= 60 && 169 if (channel->rfs_filters_added >= 60 &&
@@ -176,50 +175,48 @@ static inline void efx_filter_rfs_expire(struct efx_channel *channel)
176static inline void efx_filter_rfs_expire(struct efx_channel *channel) {} 175static inline void efx_filter_rfs_expire(struct efx_channel *channel) {}
177#define efx_filter_rfs_enabled() 0 176#define efx_filter_rfs_enabled() 0
178#endif 177#endif
179extern bool efx_filter_is_mc_recipient(const struct efx_filter_spec *spec); 178bool efx_filter_is_mc_recipient(const struct efx_filter_spec *spec);
180 179
181/* Channels */ 180/* Channels */
182extern int efx_channel_dummy_op_int(struct efx_channel *channel); 181int efx_channel_dummy_op_int(struct efx_channel *channel);
183extern void efx_channel_dummy_op_void(struct efx_channel *channel); 182void efx_channel_dummy_op_void(struct efx_channel *channel);
184extern int 183int efx_realloc_channels(struct efx_nic *efx, u32 rxq_entries, u32 txq_entries);
185efx_realloc_channels(struct efx_nic *efx, u32 rxq_entries, u32 txq_entries);
186 184
187/* Ports */ 185/* Ports */
188extern int efx_reconfigure_port(struct efx_nic *efx); 186int efx_reconfigure_port(struct efx_nic *efx);
189extern int __efx_reconfigure_port(struct efx_nic *efx); 187int __efx_reconfigure_port(struct efx_nic *efx);
190 188
191/* Ethtool support */ 189/* Ethtool support */
192extern const struct ethtool_ops efx_ethtool_ops; 190extern const struct ethtool_ops efx_ethtool_ops;
193 191
194/* Reset handling */ 192/* Reset handling */
195extern int efx_reset(struct efx_nic *efx, enum reset_type method); 193int efx_reset(struct efx_nic *efx, enum reset_type method);
196extern void efx_reset_down(struct efx_nic *efx, enum reset_type method); 194void efx_reset_down(struct efx_nic *efx, enum reset_type method);
197extern 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);
198extern int efx_try_recovery(struct efx_nic *efx); 196int efx_try_recovery(struct efx_nic *efx);
199 197
200/* Global */ 198/* Global */
201extern void efx_schedule_reset(struct efx_nic *efx, enum reset_type type); 199void efx_schedule_reset(struct efx_nic *efx, enum reset_type type);
202extern 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,
203 unsigned int rx_usecs, bool rx_adaptive, 201 unsigned int rx_usecs, bool rx_adaptive,
204 bool rx_may_override_tx); 202 bool rx_may_override_tx);
205extern 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,
206 unsigned int *rx_usecs, bool *rx_adaptive); 204 unsigned int *rx_usecs, bool *rx_adaptive);
207 205
208/* Dummy PHY ops for PHY drivers */ 206/* Dummy PHY ops for PHY drivers */
209extern int efx_port_dummy_op_int(struct efx_nic *efx); 207int efx_port_dummy_op_int(struct efx_nic *efx);
210extern void efx_port_dummy_op_void(struct efx_nic *efx); 208void efx_port_dummy_op_void(struct efx_nic *efx);
211
212 209
213/* MTD */ 210/* MTD */
214#ifdef CONFIG_SFC_MTD 211#ifdef CONFIG_SFC_MTD
215extern 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,
216 size_t n_parts, size_t sizeof_part); 213 size_t n_parts, size_t sizeof_part);
217static inline int efx_mtd_probe(struct efx_nic *efx) 214static inline int efx_mtd_probe(struct efx_nic *efx)
218{ 215{
219 return efx->type->mtd_probe(efx); 216 return efx->type->mtd_probe(efx);
220} 217}
221extern void efx_mtd_rename(struct efx_nic *efx); 218void efx_mtd_rename(struct efx_nic *efx);
222extern void efx_mtd_remove(struct efx_nic *efx); 219void efx_mtd_remove(struct efx_nic *efx);
223#else 220#else
224static inline int efx_mtd_probe(struct efx_nic *efx) { return 0; } 221static inline int efx_mtd_probe(struct efx_nic *efx) { return 0; }
225static inline void efx_mtd_rename(struct efx_nic *efx) {} 222static inline void efx_mtd_rename(struct efx_nic *efx) {}
@@ -241,9 +238,9 @@ static inline void efx_schedule_channel_irq(struct efx_channel *channel)
241 efx_schedule_channel(channel); 238 efx_schedule_channel(channel);
242} 239}
243 240
244extern void efx_link_status_changed(struct efx_nic *efx); 241void efx_link_status_changed(struct efx_nic *efx);
245extern void efx_link_set_advertising(struct efx_nic *efx, u32); 242void efx_link_set_advertising(struct efx_nic *efx, u32);
246extern void efx_link_set_wanted_fc(struct efx_nic *efx, u8); 243void efx_link_set_wanted_fc(struct efx_nic *efx, u8);
247 244
248static inline void efx_device_detach_sync(struct efx_nic *efx) 245static inline void efx_device_detach_sync(struct efx_nic *efx)
249{ 246{