linux/drivers/net/ethernet/sfc/siena/nic.c

// SPDX-License-Identifier: GPL-2.0-only
/****************************************************************************
 * Driver for Solarflare network controllers and boards
 * Copyright 2005-2006 Fen Systems Ltd.
 * Copyright 2006-2013 Solarflare Communications Inc.
 */

#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/module.h>
#include <linux/seq_file.h>
#include <linux/cpu_rmap.h>
#include "net_driver.h"
#include "bitfield.h"
#include "efx.h"
#include "nic.h"
#include "farch_regs.h"
#include "io.h"
#include "workarounds.h"
#include "mcdi_pcol.h"

/**************************************************************************
 *
 * Generic buffer handling
 * These buffers are used for interrupt status, MAC stats, etc.
 *
 **************************************************************************/

int efx_siena_alloc_buffer(struct efx_nic *efx, struct efx_buffer *buffer,
			   unsigned int len, gfp_t gfp_flags)
{}

void efx_siena_free_buffer(struct efx_nic *efx, struct efx_buffer *buffer)
{}

/* Check whether an event is present in the eventq at the current
 * read pointer.  Only useful for self-test.
 */
bool efx_siena_event_present(struct efx_channel *channel)
{}

void efx_siena_event_test_start(struct efx_channel *channel)
{}

int efx_siena_irq_test_start(struct efx_nic *efx)
{}

/* Hook interrupt handler(s)
 * Try MSI and then legacy interrupts.
 */
int efx_siena_init_interrupt(struct efx_nic *efx)
{}

void efx_siena_fini_interrupt(struct efx_nic *efx)
{}

/* Register dump */

#define REGISTER_REVISION_FA
#define REGISTER_REVISION_FB
#define REGISTER_REVISION_FC
#define REGISTER_REVISION_FZ
#define REGISTER_REVISION_ED
#define REGISTER_REVISION_EZ

struct efx_nic_reg {};

#define REGISTER(name, arch, min_rev, max_rev)
#define REGISTER_AA(name)
#define REGISTER_AB(name)
#define REGISTER_AZ(name)
#define REGISTER_BB(name)
#define REGISTER_BZ(name)
#define REGISTER_CZ(name)

static const struct efx_nic_reg efx_nic_regs[] =;

struct efx_nic_reg_table {};

#define REGISTER_TABLE_DIMENSIONS(_, offset, arch, min_rev, max_rev, step, rows)
#define REGISTER_TABLE(name, arch, min_rev, max_rev)
#define REGISTER_TABLE_AA(name)
#define REGISTER_TABLE_AZ(name)
#define REGISTER_TABLE_BB(name)
#define REGISTER_TABLE_BZ(name)
#define REGISTER_TABLE_BB_CZ(name)
#define REGISTER_TABLE_CZ(name)

static const struct efx_nic_reg_table efx_nic_reg_tables[] =;

size_t efx_siena_get_regs_len(struct efx_nic *efx)
{}

void efx_siena_get_regs(struct efx_nic *efx, void *buf)
{}

/**
 * efx_siena_describe_stats - Describe supported statistics for ethtool
 * @desc: Array of &struct efx_hw_stat_desc describing the statistics
 * @count: Length of the @desc array
 * @mask: Bitmask of which elements of @desc are enabled
 * @names: Buffer to copy names to, or %NULL.  The names are copied
 *	starting at intervals of %ETH_GSTRING_LEN bytes.
 *
 * Returns the number of visible statistics, i.e. the number of set
 * bits in the first @count bits of @mask for which a name is defined.
 */
size_t efx_siena_describe_stats(const struct efx_hw_stat_desc *desc, size_t count,
				const unsigned long *mask, u8 *names)
{}

/**
 * efx_siena_update_stats - Convert statistics DMA buffer to array of u64
 * @desc: Array of &struct efx_hw_stat_desc describing the DMA buffer
 *	layout.  DMA widths of 0, 16, 32 and 64 are supported; where
 *	the width is specified as 0 the corresponding element of
 *	@stats is not updated.
 * @count: Length of the @desc array
 * @mask: Bitmask of which elements of @desc are enabled
 * @stats: Buffer to update with the converted statistics.  The length
 *	of this array must be at least @count.
 * @dma_buf: DMA buffer containing hardware statistics
 * @accumulate: If set, the converted values will be added rather than
 *	directly stored to the corresponding elements of @stats
 */
void efx_siena_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_siena_fix_nodesc_drop_stat(struct efx_nic *efx, u64 *rx_nodesc_drops)
{}