#include "net_driver.h"
#include "ef100_nic.h"
#include "efx_devlink.h"
#include <linux/rtc.h>
#include "mcdi.h"
#include "mcdi_functions.h"
#include "mcdi_pcol.h"
#ifdef CONFIG_SFC_SRIOV
#include "mae.h"
#include "ef100_rep.h"
#endif
struct efx_devlink { … };
#ifdef CONFIG_SFC_SRIOV
static int efx_devlink_port_addr_get(struct devlink_port *port, u8 *hw_addr,
int *hw_addr_len,
struct netlink_ext_ack *extack)
{ … }
static int efx_devlink_port_addr_set(struct devlink_port *port,
const u8 *hw_addr, int hw_addr_len,
struct netlink_ext_ack *extack)
{ … }
static const struct devlink_port_ops sfc_devlink_port_ops = …;
static void efx_devlink_del_port(struct devlink_port *dl_port)
{ … }
static int efx_devlink_add_port(struct efx_nic *efx,
struct mae_mport_desc *mport)
{ … }
#endif
static int efx_devlink_info_nvram_partition(struct efx_nic *efx,
struct devlink_info_req *req,
unsigned int partition_type,
const char *version_name)
{ … }
static int efx_devlink_info_stored_versions(struct efx_nic *efx,
struct devlink_info_req *req)
{ … }
#define EFX_VER_FLAG(_f) …
static void efx_devlink_info_running_v2(struct efx_nic *efx,
struct devlink_info_req *req,
unsigned int flags, efx_dword_t *outbuf)
{ … }
static void efx_devlink_info_running_v3(struct efx_nic *efx,
struct devlink_info_req *req,
unsigned int flags, efx_dword_t *outbuf)
{ … }
static void efx_devlink_info_running_v4(struct efx_nic *efx,
struct devlink_info_req *req,
unsigned int flags, efx_dword_t *outbuf)
{ … }
static void efx_devlink_info_running_v5(struct efx_nic *efx,
struct devlink_info_req *req,
unsigned int flags, efx_dword_t *outbuf)
{ … }
static int efx_devlink_info_running_versions(struct efx_nic *efx,
struct devlink_info_req *req)
{ … }
#define EFX_MAX_SERIALNUM_LEN …
static int efx_devlink_info_board_cfg(struct efx_nic *efx,
struct devlink_info_req *req)
{ … }
static int efx_devlink_info_get(struct devlink *devlink,
struct devlink_info_req *req,
struct netlink_ext_ack *extack)
{ … }
static const struct devlink_ops sfc_devlink_ops = …;
#ifdef CONFIG_SFC_SRIOV
static struct devlink_port *ef100_set_devlink_port(struct efx_nic *efx, u32 idx)
{ … }
void ef100_rep_set_devlink_port(struct efx_rep *efv)
{ … }
void ef100_pf_set_devlink_port(struct efx_nic *efx)
{ … }
void ef100_rep_unset_devlink_port(struct efx_rep *efv)
{ … }
void ef100_pf_unset_devlink_port(struct efx_nic *efx)
{ … }
#endif
void efx_fini_devlink_lock(struct efx_nic *efx)
{ … }
void efx_fini_devlink_and_unlock(struct efx_nic *efx)
{ … }
int efx_probe_devlink_and_lock(struct efx_nic *efx)
{ … }
void efx_probe_devlink_unlock(struct efx_nic *efx)
{ … }