diff options
Diffstat (limited to 'drivers/net/ethernet/sfc/efx.h')
-rw-r--r-- | drivers/net/ethernet/sfc/efx.h | 105 |
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 */ |
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); | 32 | extern unsigned int efx_piobuf_size; |
33 | 33 | ||
34 | /* RX */ | 34 | /* RX */ |
35 | extern void efx_rx_config_page_split(struct efx_nic *efx); | 35 | void efx_rx_config_page_split(struct efx_nic *efx); |
36 | extern int efx_probe_rx_queue(struct efx_rx_queue *rx_queue); | 36 | int efx_probe_rx_queue(struct efx_rx_queue *rx_queue); |
37 | extern void efx_remove_rx_queue(struct efx_rx_queue *rx_queue); | 37 | void efx_remove_rx_queue(struct efx_rx_queue *rx_queue); |
38 | extern void efx_init_rx_queue(struct efx_rx_queue *rx_queue); | 38 | void efx_init_rx_queue(struct efx_rx_queue *rx_queue); |
39 | extern void efx_fini_rx_queue(struct efx_rx_queue *rx_queue); | 39 | void efx_fini_rx_queue(struct efx_rx_queue *rx_queue); |
40 | 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); |
41 | extern void efx_rx_slow_fill(unsigned long context); | 41 | void efx_rx_slow_fill(unsigned long context); |
42 | extern void __efx_rx_packet(struct efx_channel *channel); | 42 | void __efx_rx_packet(struct efx_channel *channel); |
43 | 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, |
44 | unsigned int index, unsigned int n_frags, | 44 | unsigned int n_frags, unsigned int len, u16 flags); |
45 | unsigned int len, u16 flags); | ||
46 | static inline void efx_rx_flush_packet(struct efx_channel *channel) | 45 | static 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 | } |
51 | extern void efx_schedule_slow_fill(struct efx_rx_queue *rx_queue); | 50 | void 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 |
165 | 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, |
166 | u16 rxq_index, u32 flow_id); | 165 | u16 rxq_index, u32 flow_id); |
167 | extern bool __efx_filter_rfs_expire(struct efx_nic *efx, unsigned quota); | 166 | bool __efx_filter_rfs_expire(struct efx_nic *efx, unsigned quota); |
168 | static inline void efx_filter_rfs_expire(struct efx_channel *channel) | 167 | static 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) | |||
176 | static inline void efx_filter_rfs_expire(struct efx_channel *channel) {} | 175 | static 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 |
179 | 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); |
180 | 179 | ||
181 | /* Channels */ | 180 | /* Channels */ |
182 | extern int efx_channel_dummy_op_int(struct efx_channel *channel); | 181 | int efx_channel_dummy_op_int(struct efx_channel *channel); |
183 | extern void efx_channel_dummy_op_void(struct efx_channel *channel); | 182 | void efx_channel_dummy_op_void(struct efx_channel *channel); |
184 | extern int | 183 | int efx_realloc_channels(struct efx_nic *efx, u32 rxq_entries, u32 txq_entries); |
185 | efx_realloc_channels(struct efx_nic *efx, u32 rxq_entries, u32 txq_entries); | ||
186 | 184 | ||
187 | /* Ports */ | 185 | /* Ports */ |
188 | extern int efx_reconfigure_port(struct efx_nic *efx); | 186 | int efx_reconfigure_port(struct efx_nic *efx); |
189 | extern int __efx_reconfigure_port(struct efx_nic *efx); | 187 | int __efx_reconfigure_port(struct efx_nic *efx); |
190 | 188 | ||
191 | /* Ethtool support */ | 189 | /* Ethtool support */ |
192 | extern const struct ethtool_ops efx_ethtool_ops; | 190 | extern const struct ethtool_ops efx_ethtool_ops; |
193 | 191 | ||
194 | /* Reset handling */ | 192 | /* Reset handling */ |
195 | extern int efx_reset(struct efx_nic *efx, enum reset_type method); | 193 | int efx_reset(struct efx_nic *efx, enum reset_type method); |
196 | 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); |
197 | 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); |
198 | extern int efx_try_recovery(struct efx_nic *efx); | 196 | int efx_try_recovery(struct efx_nic *efx); |
199 | 197 | ||
200 | /* Global */ | 198 | /* Global */ |
201 | 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); |
202 | 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, |
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); |
205 | 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, |
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 */ |
209 | extern int efx_port_dummy_op_int(struct efx_nic *efx); | 207 | int efx_port_dummy_op_int(struct efx_nic *efx); |
210 | extern void efx_port_dummy_op_void(struct efx_nic *efx); | 208 | void 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 |
215 | 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, |
216 | size_t n_parts, size_t sizeof_part); | 213 | size_t n_parts, size_t sizeof_part); |
217 | static inline int efx_mtd_probe(struct efx_nic *efx) | 214 | static 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 | } |
221 | extern void efx_mtd_rename(struct efx_nic *efx); | 218 | void efx_mtd_rename(struct efx_nic *efx); |
222 | extern void efx_mtd_remove(struct efx_nic *efx); | 219 | void efx_mtd_remove(struct efx_nic *efx); |
223 | #else | 220 | #else |
224 | 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; } |
225 | static inline void efx_mtd_rename(struct efx_nic *efx) {} | 222 | static 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 | ||
244 | extern void efx_link_status_changed(struct efx_nic *efx); | 241 | void efx_link_status_changed(struct efx_nic *efx); |
245 | extern void efx_link_set_advertising(struct efx_nic *efx, u32); | 242 | void efx_link_set_advertising(struct efx_nic *efx, u32); |
246 | extern void efx_link_set_wanted_fc(struct efx_nic *efx, u8); | 243 | void efx_link_set_wanted_fc(struct efx_nic *efx, u8); |
247 | 244 | ||
248 | static inline void efx_device_detach_sync(struct efx_nic *efx) | 245 | static inline void efx_device_detach_sync(struct efx_nic *efx) |
249 | { | 246 | { |