linux/drivers/net/ethernet/sfc/falcon/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"

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

int ef4_nic_alloc_buffer(struct ef4_nic *efx, struct ef4_buffer *buffer,
			 unsigned int len, gfp_t gfp_flags)
{}

void ef4_nic_free_buffer(struct ef4_nic *efx, struct ef4_buffer *buffer)
{}

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

void ef4_nic_event_test_start(struct ef4_channel *channel)
{}

int ef4_nic_irq_test_start(struct ef4_nic *efx)
{}

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

void ef4_nic_fini_interrupt(struct ef4_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 ef4_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 ef4_nic_reg ef4_nic_regs[] =;

struct ef4_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 ef4_nic_reg_table ef4_nic_reg_tables[] =;

size_t ef4_nic_get_regs_len(struct ef4_nic *efx)
{}

void ef4_nic_get_regs(struct ef4_nic *efx, void *buf)
{}

/**
 * ef4_nic_describe_stats - Describe supported statistics for ethtool
 * @desc: Array of &struct ef4_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 ef4_nic_describe_stats(const struct ef4_hw_stat_desc *desc, size_t count,
			      const unsigned long *mask, u8 *names)
{}

/**
 * ef4_nic_update_stats - Convert statistics DMA buffer to array of u64
 * @desc: Array of &struct ef4_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 ef4_nic_update_stats(const struct ef4_hw_stat_desc *desc, size_t count,
			  const unsigned long *mask,
			  u64 *stats, const void *dma_buf, bool accumulate)
{}

void ef4_nic_fix_nodesc_drop_stat(struct ef4_nic *efx, u64 *rx_nodesc_drops)
{}