linux/drivers/net/ethernet/sfc/siena/siena.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/pci.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/random.h>
#include "net_driver.h"
#include "bitfield.h"
#include "efx.h"
#include "efx_common.h"
#include "nic.h"
#include "farch_regs.h"
#include "io.h"
#include "workarounds.h"
#include "mcdi.h"
#include "mcdi_pcol.h"
#include "mcdi_port.h"
#include "mcdi_port_common.h"
#include "selftest.h"
#include "siena_sriov.h"
#include "rx_common.h"

/* Hardware control for SFC9000 family including SFL9021 (aka Siena). */

static void siena_init_wol(struct efx_nic *efx);


static void siena_push_irq_moderation(struct efx_channel *channel)
{}

void efx_siena_prepare_flush(struct efx_nic *efx)
{}

void siena_finish_flush(struct efx_nic *efx)
{}

static const struct efx_farch_register_test siena_register_tests[] =;

static int siena_test_chip(struct efx_nic *efx, struct efx_self_tests *tests)
{}

/**************************************************************************
 *
 * PTP
 *
 **************************************************************************
 */

static void siena_ptp_write_host_time(struct efx_nic *efx, u32 host_time)
{}

static int siena_ptp_set_ts_config(struct efx_nic *efx,
				   struct kernel_hwtstamp_config *init)
{}

/**************************************************************************
 *
 * Device reset
 *
 **************************************************************************
 */

static int siena_map_reset_flags(u32 *flags)
{}

#ifdef CONFIG_EEH
/* When a PCI device is isolated from the bus, a subsequent MMIO read is
 * required for the kernel EEH mechanisms to notice. As the Solarflare driver
 * was written to minimise MMIO read (for latency) then a periodic call to check
 * the EEH status of the device is required so that device recovery can happen
 * in a timely fashion.
 */
static void siena_monitor(struct efx_nic *efx)
{
	struct eeh_dev *eehdev = pci_dev_to_eeh_dev(efx->pci_dev);

	eeh_dev_check_failure(eehdev);
}
#endif

static int siena_probe_nvconfig(struct efx_nic *efx)
{}

static int siena_dimension_resources(struct efx_nic *efx)
{}

/* On all Falcon-architecture NICs, PFs use BAR 0 for I/O space and BAR 2(&3)
 * for memory.
 */
static unsigned int siena_mem_bar(struct efx_nic *efx)
{}

static unsigned int siena_mem_map_size(struct efx_nic *efx)
{}

static int siena_probe_nic(struct efx_nic *efx)
{}

static int siena_rx_pull_rss_config(struct efx_nic *efx)
{}

static int siena_rx_push_rss_config(struct efx_nic *efx, bool user,
				    const u32 *rx_indir_table, const u8 *key)
{}

/* This call performs hardware-specific global initialisation, such as
 * defining the descriptor cache sizes and number of RSS channels.
 * It does not set up any buffers, descriptor rings or event queues.
 */
static int siena_init_nic(struct efx_nic *efx)
{}

static void siena_remove_nic(struct efx_nic *efx)
{}

#define SIENA_DMA_STAT(ext_name, mcdi_name)
#define SIENA_OTHER_STAT(ext_name)
#define GENERIC_SW_STAT(ext_name)

static const struct efx_hw_stat_desc siena_stat_desc[SIENA_STAT_COUNT] =;
static const unsigned long siena_stat_mask[] =;

static size_t siena_describe_nic_stats(struct efx_nic *efx, u8 *names)
{}

static int siena_try_update_nic_stats(struct efx_nic *efx)
{}

static size_t siena_update_nic_stats(struct efx_nic *efx, u64 *full_stats,
				     struct rtnl_link_stats64 *core_stats)
{}

static int siena_mac_reconfigure(struct efx_nic *efx, bool mtu_only __always_unused)
{}

/**************************************************************************
 *
 * Wake on LAN
 *
 **************************************************************************
 */

static void siena_get_wol(struct efx_nic *efx, struct ethtool_wolinfo *wol)
{}


static int siena_set_wol(struct efx_nic *efx, u32 type)
{}


static void siena_init_wol(struct efx_nic *efx)
{}

/**************************************************************************
 *
 * MCDI
 *
 **************************************************************************
 */

#define MCDI_PDU(efx)
#define MCDI_DOORBELL(efx)
#define MCDI_STATUS(efx)

static void siena_mcdi_request(struct efx_nic *efx,
			       const efx_dword_t *hdr, size_t hdr_len,
			       const efx_dword_t *sdu, size_t sdu_len)
{}

static bool siena_mcdi_poll_response(struct efx_nic *efx)
{}

static void siena_mcdi_read_response(struct efx_nic *efx, efx_dword_t *outbuf,
				     size_t offset, size_t outlen)
{}

static int siena_mcdi_poll_reboot(struct efx_nic *efx)
{}

/**************************************************************************
 *
 * MTD
 *
 **************************************************************************
 */

#ifdef CONFIG_SFC_SIENA_MTD

struct siena_nvram_type_info {};

static const struct siena_nvram_type_info siena_nvram_types[] =;

static int siena_mtd_probe_partition(struct efx_nic *efx,
				     struct efx_mcdi_mtd_partition *part,
				     unsigned int type)
{}

static int siena_mtd_get_fw_subtypes(struct efx_nic *efx,
				     struct efx_mcdi_mtd_partition *parts,
				     size_t n_parts)
{}

static int siena_mtd_probe(struct efx_nic *efx)
{}

#endif /* CONFIG_SFC_SIENA_MTD */

static unsigned int siena_check_caps(const struct efx_nic *efx,
				     u8 flag, u32 offset)
{}

static unsigned int efx_siena_recycle_ring_size(const struct efx_nic *efx)
{}

/**************************************************************************
 *
 * Revision-dependent attributes used by efx.c and nic.c
 *
 **************************************************************************
 */

const struct efx_nic_type siena_a0_nic_type =;