aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/nic.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2012-09-12 20:11:31 -0400
committerBen Hutchings <bhutchings@solarflare.com>2013-08-21 11:35:20 -0400
commitab0115fc7dc429300fc6b728ab04ee832fbb945d (patch)
tree5a646c3db604ee6bab45cfdcafaa8785961e1944 /drivers/net/ethernet/sfc/nic.h
parent9dd3a13b885fef7dca0d2f27517a50b5fb5097c6 (diff)
sfc: Move more Falcon-specific code and definitions into falcon.c
In particular, fold in the whole of falcon_xmac.c. Drop some entirely unused definitions. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/nic.h')
-rw-r--r--drivers/net/ethernet/sfc/nic.h43
1 files changed, 1 insertions, 42 deletions
diff --git a/drivers/net/ethernet/sfc/nic.h b/drivers/net/ethernet/sfc/nic.h
index a78436320ab2..0d38cc2e96aa 100644
--- a/drivers/net/ethernet/sfc/nic.h
+++ b/drivers/net/ethernet/sfc/nic.h
@@ -297,12 +297,6 @@ extern int efx_nic_process_eventq(struct efx_channel *channel, int rx_quota);
297extern void efx_nic_eventq_read_ack(struct efx_channel *channel); 297extern void efx_nic_eventq_read_ack(struct efx_channel *channel);
298extern bool efx_nic_event_present(struct efx_channel *channel); 298extern bool efx_nic_event_present(struct efx_channel *channel);
299 299
300/* MAC/PHY */
301extern void falcon_reconfigure_mac_wrapper(struct efx_nic *efx);
302extern bool falcon_xmac_check_fault(struct efx_nic *efx);
303extern int falcon_reconfigure_xmac(struct efx_nic *efx);
304extern void falcon_update_stats_xmac(struct efx_nic *efx);
305
306/* Some statistics are computed as A - B where A and B each increase 300/* Some statistics are computed as A - B where A and B each increase
307 * linearly with some hardware counter(s) and the counters are read 301 * linearly with some hardware counter(s) and the counters are read
308 * asynchronously. If the counters contributing to B are always read 302 * asynchronously. If the counters contributing to B are always read
@@ -347,7 +341,6 @@ extern void siena_prepare_flush(struct efx_nic *efx);
347extern void siena_finish_flush(struct efx_nic *efx); 341extern void siena_finish_flush(struct efx_nic *efx);
348extern void falcon_start_nic_stats(struct efx_nic *efx); 342extern void falcon_start_nic_stats(struct efx_nic *efx);
349extern void falcon_stop_nic_stats(struct efx_nic *efx); 343extern void falcon_stop_nic_stats(struct efx_nic *efx);
350extern void falcon_setup_xaui(struct efx_nic *efx);
351extern int falcon_reset_xaui(struct efx_nic *efx); 344extern int falcon_reset_xaui(struct efx_nic *efx);
352extern void 345extern void
353efx_nic_dimension_resources(struct efx_nic *efx, unsigned sram_lim_qw); 346efx_nic_dimension_resources(struct efx_nic *efx, unsigned sram_lim_qw);
@@ -370,43 +363,9 @@ extern int efx_nic_test_registers(struct efx_nic *efx,
370extern size_t efx_nic_get_regs_len(struct efx_nic *efx); 363extern size_t efx_nic_get_regs_len(struct efx_nic *efx);
371extern void efx_nic_get_regs(struct efx_nic *efx, void *buf); 364extern void efx_nic_get_regs(struct efx_nic *efx, void *buf);
372 365
373/************************************************************************** 366#define EFX_MAX_FLUSH_TIME 5000
374 *
375 * Falcon MAC stats
376 *
377 **************************************************************************
378 */
379
380#define FALCON_STAT_OFFSET(falcon_stat) EFX_VAL(falcon_stat, offset)
381#define FALCON_STAT_WIDTH(falcon_stat) EFX_VAL(falcon_stat, WIDTH)
382
383/* Retrieve statistic from statistics block */
384#define FALCON_STAT(efx, falcon_stat, efx_stat) do { \
385 if (FALCON_STAT_WIDTH(falcon_stat) == 16) \
386 (efx)->mac_stats.efx_stat += le16_to_cpu( \
387 *((__force __le16 *) \
388 (efx->stats_buffer.addr + \
389 FALCON_STAT_OFFSET(falcon_stat)))); \
390 else if (FALCON_STAT_WIDTH(falcon_stat) == 32) \
391 (efx)->mac_stats.efx_stat += le32_to_cpu( \
392 *((__force __le32 *) \
393 (efx->stats_buffer.addr + \
394 FALCON_STAT_OFFSET(falcon_stat)))); \
395 else \
396 (efx)->mac_stats.efx_stat += le64_to_cpu( \
397 *((__force __le64 *) \
398 (efx->stats_buffer.addr + \
399 FALCON_STAT_OFFSET(falcon_stat)))); \
400 } while (0)
401
402#define FALCON_MAC_STATS_SIZE 0x100
403
404#define MAC_DATA_LBN 0
405#define MAC_DATA_WIDTH 32
406 367
407extern void efx_generate_event(struct efx_nic *efx, unsigned int evq, 368extern void efx_generate_event(struct efx_nic *efx, unsigned int evq,
408 efx_qword_t *event); 369 efx_qword_t *event);
409 370
410extern void falcon_poll_xmac(struct efx_nic *efx);
411
412#endif /* EFX_NIC_H */ 371#endif /* EFX_NIC_H */