#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"
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)
{ … }
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)
{ … }
static int siena_map_reset_flags(u32 *flags)
{ … }
#ifdef CONFIG_EEH
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)
{ … }
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)
{ … }
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)
{ … }
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)
{ … }
#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)
{ … }
#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
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)
{ … }
const struct efx_nic_type siena_a0_nic_type = …;