linux/drivers/net/ethernet/sfc/ef100_nic.c

// SPDX-License-Identifier: GPL-2.0-only
/****************************************************************************
 * Driver for Solarflare network controllers and boards
 * Copyright 2018 Solarflare Communications Inc.
 * Copyright 2019-2022 Xilinx Inc.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 as published
 * by the Free Software Foundation, incorporated herein by reference.
 */

#include "ef100_nic.h"
#include "efx_common.h"
#include "efx_channels.h"
#include "io.h"
#include "selftest.h"
#include "ef100_regs.h"
#include "mcdi.h"
#include "mcdi_pcol.h"
#include "mcdi_port_common.h"
#include "mcdi_functions.h"
#include "mcdi_filters.h"
#include "ef100_rx.h"
#include "ef100_tx.h"
#include "ef100_sriov.h"
#include "ef100_netdev.h"
#include "tc.h"
#include "mae.h"
#include "rx_common.h"

#define EF100_MAX_VIS
#define EF100_NUM_MCDI_BUFFERS
#define MCDI_BUF_LEN

#define EF100_RESET_PORT

/*	MCDI
 */
static u8 *ef100_mcdi_buf(struct efx_nic *efx, u8 bufid, dma_addr_t *dma_addr)
{}

static int ef100_get_warm_boot_count(struct efx_nic *efx)
{}

static void ef100_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 ef100_mcdi_poll_response(struct efx_nic *efx)
{}

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

static int ef100_mcdi_poll_reboot(struct efx_nic *efx)
{}

static void ef100_mcdi_reboot_detected(struct efx_nic *efx)
{}

/*	MCDI calls
 */
int ef100_get_mac_address(struct efx_nic *efx, u8 *mac_address,
			  int client_handle, bool empty_ok)
{}

int efx_ef100_init_datapath_caps(struct efx_nic *efx)
{}

/*	Event handling
 */
static int ef100_ev_probe(struct efx_channel *channel)
{}

static int ef100_ev_init(struct efx_channel *channel)
{}

static void ef100_ev_read_ack(struct efx_channel *channel)
{}

#define EFX_NAPI_MAX_TX

static int ef100_ev_process(struct efx_channel *channel, int quota)
{}

static irqreturn_t ef100_msi_interrupt(int irq, void *dev_id)
{}

int ef100_phy_probe(struct efx_nic *efx)
{}

int ef100_filter_table_probe(struct efx_nic *efx)
{}

static int ef100_filter_table_up(struct efx_nic *efx)
{}

static void ef100_filter_table_down(struct efx_nic *efx)
{}

/*	Other
 */
static int ef100_reconfigure_mac(struct efx_nic *efx, bool mtu_only)
{}

static enum reset_type ef100_map_reset_reason(enum reset_type reason)
{}

static int ef100_map_reset_flags(u32 *flags)
{}

static int ef100_reset(struct efx_nic *efx, enum reset_type reset_type)
{}

static void ef100_common_stat_mask(unsigned long *mask)
{}

static void ef100_ethtool_stat_mask(unsigned long *mask)
{}

#define EF100_DMA_STAT(ext_name, mcdi_name)

static const struct efx_hw_stat_desc ef100_stat_desc[EF100_STAT_COUNT] =;

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

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

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

static int efx_ef100_get_phys_port_id(struct efx_nic *efx,
				      struct netdev_phys_item_id *ppid)
{}

static int efx_ef100_irq_test_generate(struct efx_nic *efx)
{}

#define EFX_EF100_TEST

static void efx_ef100_ev_test_generate(struct efx_channel *channel)
{}

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

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

static int efx_ef100_get_base_mport(struct efx_nic *efx)
{}

static int compare_versions(const char *a, const char *b)
{}

enum ef100_tlv_state_machine {};

struct ef100_tlv_state {};

static int ef100_tlv_feed(struct ef100_tlv_state *state, u8 byte)
{}

static int ef100_process_design_param(struct efx_nic *efx,
				      const struct ef100_tlv_state *reader)
{}

static int ef100_check_design_params(struct efx_nic *efx)
{}

/*	NIC probe and remove
 */
static int ef100_probe_main(struct efx_nic *efx)
{}

/* MCDI commands are related to the same device issuing them. This function
 * allows to do an MCDI command on behalf of another device, mainly PFs setting
 * things for VFs.
 */
int efx_ef100_lookup_client_id(struct efx_nic *efx, efx_qword_t pciefn, u32 *id)
{}

int ef100_probe_netdev_pf(struct efx_nic *efx)
{}

int ef100_probe_vf(struct efx_nic *efx)
{}

void ef100_remove(struct efx_nic *efx)
{}

/*	NIC level access functions
 */
#define EF100_OFFLOAD_FEATURES

const struct efx_nic_type ef100_pf_nic_type =;

const struct efx_nic_type ef100_vf_nic_type =;