#include <linux/etherdevice.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/lockdep.h>
#include <linux/pci.h>
#include <linux/pci_regs.h>
#include <linux/random.h>
#include <linux/rtnetlink.h>
#include "nfpcore/nfp.h"
#include "nfpcore/nfp_cpp.h"
#include "nfpcore/nfp_dev.h"
#include "nfpcore/nfp_nffw.h"
#include "nfpcore/nfp_nsp.h"
#include "nfpcore/nfp6000_pcie.h"
#include "nfp_app.h"
#include "nfp_net_ctrl.h"
#include "nfp_net_sriov.h"
#include "nfp_net.h"
#include "nfp_main.h"
#include "nfp_port.h"
#define NFP_PF_CSR_SLICE_SIZE …
void
nfp_net_get_mac_addr(struct nfp_pf *pf, struct net_device *netdev,
struct nfp_port *port)
{ … }
static struct nfp_eth_table_port *
nfp_net_find_port(struct nfp_eth_table *eth_tbl, unsigned int index)
{ … }
static int nfp_net_pf_get_num_ports(struct nfp_pf *pf)
{ … }
static void nfp_net_pf_free_vnic(struct nfp_pf *pf, struct nfp_net *nn)
{ … }
static void nfp_net_pf_free_vnics(struct nfp_pf *pf)
{ … }
static struct nfp_net *
nfp_net_pf_alloc_vnic(struct nfp_pf *pf, bool needs_netdev,
void __iomem *ctrl_bar, void __iomem *qc_bar,
int stride, unsigned int id)
{ … }
static int
nfp_net_pf_init_vnic(struct nfp_pf *pf, struct nfp_net *nn, unsigned int id)
{ … }
static int
nfp_net_pf_alloc_vnics(struct nfp_pf *pf, void __iomem *ctrl_bar,
void __iomem *qc_bar, int stride)
{ … }
static void nfp_net_pf_clean_vnic(struct nfp_pf *pf, struct nfp_net *nn)
{ … }
static int nfp_net_pf_alloc_irqs(struct nfp_pf *pf)
{ … }
static void nfp_net_pf_free_irqs(struct nfp_pf *pf)
{ … }
static int nfp_net_pf_init_vnics(struct nfp_pf *pf)
{ … }
static int
nfp_net_pf_app_init(struct nfp_pf *pf, u8 __iomem *qc_bar, unsigned int stride)
{ … }
static void nfp_net_pf_app_clean(struct nfp_pf *pf)
{ … }
static int nfp_net_pf_app_start_ctrl(struct nfp_pf *pf)
{ … }
static void nfp_net_pf_app_stop_ctrl(struct nfp_pf *pf)
{ … }
static int nfp_net_pf_app_start(struct nfp_pf *pf)
{ … }
static void nfp_net_pf_app_stop(struct nfp_pf *pf)
{ … }
static void nfp_net_pci_unmap_mem(struct nfp_pf *pf)
{ … }
static int nfp_net_pci_map_mem(struct nfp_pf *pf)
{ … }
static const unsigned int lr_to_speed[] = …;
unsigned int nfp_net_lr2speed(unsigned int linkrate)
{ … }
unsigned int nfp_net_speed2lr(unsigned int speed)
{ … }
static void nfp_net_notify_port_speed(struct nfp_port *port)
{ … }
static int
nfp_net_eth_port_update(struct nfp_cpp *cpp, struct nfp_port *port,
struct nfp_eth_table *eth_table)
{ … }
int nfp_net_refresh_port_table_sync(struct nfp_pf *pf)
{ … }
static void nfp_net_refresh_vnics(struct work_struct *work)
{ … }
void nfp_net_refresh_port_table(struct nfp_port *port)
{ … }
int nfp_net_refresh_eth_port(struct nfp_port *port)
{ … }
int nfp_net_pci_probe(struct nfp_pf *pf)
{ … }
void nfp_net_pci_remove(struct nfp_pf *pf)
{ … }