#ifndef EFX_NIC_COMMON_H
#define EFX_NIC_COMMON_H
#include "net_driver.h"
#include "efx_common.h"
#include "mcdi.h"
#include "ptp.h"
enum { … };
static inline int efx_nic_rev(struct efx_nic *efx)
{ … }
static inline efx_qword_t *efx_event(struct efx_channel *channel,
unsigned int index)
{ … }
static inline int efx_event_present(efx_qword_t *event)
{ … }
static inline efx_qword_t *
efx_tx_desc(struct efx_tx_queue *tx_queue, unsigned int index)
{ … }
static inline bool efx_nic_tx_is_empty(struct efx_tx_queue *tx_queue, unsigned int write_count)
{ … }
int efx_enqueue_skb_tso(struct efx_tx_queue *tx_queue, struct sk_buff *skb,
bool *data_mapped);
static inline bool efx_nic_may_push_tx_desc(struct efx_tx_queue *tx_queue,
unsigned int write_count)
{ … }
static inline efx_qword_t *
efx_rx_desc(struct efx_rx_queue *rx_queue, unsigned int index)
{ … }
#define EFX_PAGE_SIZE …
#define EFX_BUF_SIZE …
enum { … };
#define EFX_GENERIC_SW_STAT(ext_name) …
static inline int efx_nic_probe_tx(struct efx_tx_queue *tx_queue)
{ … }
static inline void efx_nic_init_tx(struct efx_tx_queue *tx_queue)
{ … }
static inline void efx_nic_remove_tx(struct efx_tx_queue *tx_queue)
{ … }
static inline void efx_nic_push_buffers(struct efx_tx_queue *tx_queue)
{ … }
static inline int efx_nic_probe_rx(struct efx_rx_queue *rx_queue)
{ … }
static inline void efx_nic_init_rx(struct efx_rx_queue *rx_queue)
{ … }
static inline void efx_nic_remove_rx(struct efx_rx_queue *rx_queue)
{ … }
static inline void efx_nic_notify_rx_desc(struct efx_rx_queue *rx_queue)
{ … }
static inline void efx_nic_generate_fill_event(struct efx_rx_queue *rx_queue)
{ … }
static inline int efx_nic_probe_eventq(struct efx_channel *channel)
{ … }
static inline int efx_nic_init_eventq(struct efx_channel *channel)
{ … }
static inline void efx_nic_fini_eventq(struct efx_channel *channel)
{ … }
static inline void efx_nic_remove_eventq(struct efx_channel *channel)
{ … }
static inline int
efx_nic_process_eventq(struct efx_channel *channel, int quota)
{ … }
static inline void efx_nic_eventq_read_ack(struct efx_channel *channel)
{ … }
void efx_nic_event_test_start(struct efx_channel *channel);
bool efx_nic_event_present(struct efx_channel *channel);
static inline void efx_sensor_event(struct efx_nic *efx, efx_qword_t *ev)
{ … }
static inline unsigned int efx_rx_recycle_ring_size(const struct efx_nic *efx)
{ … }
static inline void efx_update_diff_stat(u64 *stat, u64 diff)
{ … }
int efx_nic_init_interrupt(struct efx_nic *efx);
int efx_nic_irq_test_start(struct efx_nic *efx);
void efx_nic_fini_interrupt(struct efx_nic *efx);
static inline int efx_nic_event_test_irq_cpu(struct efx_channel *channel)
{ … }
static inline int efx_nic_irq_test_irq_cpu(struct efx_nic *efx)
{ … }
int efx_nic_alloc_buffer(struct efx_nic *efx, struct efx_buffer *buffer,
unsigned int len, gfp_t gfp_flags);
void efx_nic_free_buffer(struct efx_nic *efx, struct efx_buffer *buffer);
size_t efx_nic_get_regs_len(struct efx_nic *efx);
void efx_nic_get_regs(struct efx_nic *efx, void *buf);
#define EFX_MC_STATS_GENERATION_INVALID …
size_t efx_nic_describe_stats(const struct efx_hw_stat_desc *desc, size_t count,
const unsigned long *mask, u8 *names);
int efx_nic_copy_stats(struct efx_nic *efx, __le64 *dest);
void efx_nic_update_stats(const struct efx_hw_stat_desc *desc, size_t count,
const unsigned long *mask, u64 *stats,
const void *dma_buf, bool accumulate);
void efx_nic_fix_nodesc_drop_stat(struct efx_nic *efx, u64 *stat);
static inline size_t efx_nic_update_stats_atomic(struct efx_nic *efx, u64 *full_stats,
struct rtnl_link_stats64 *core_stats)
{ … }
#define EFX_MAX_FLUSH_TIME …
#endif