#include <net/dsa.h>
#include "chip.h"
#include "devlink.h"
#include "global1.h"
#include "global2.h"
#include "port.h"
static int mv88e6xxx_atu_get_hash(struct mv88e6xxx_chip *chip, u8 *hash)
{ … }
static int mv88e6xxx_atu_set_hash(struct mv88e6xxx_chip *chip, u8 hash)
{ … }
enum mv88e6xxx_devlink_param_id { … };
int mv88e6xxx_devlink_param_get(struct dsa_switch *ds, u32 id,
struct devlink_param_gset_ctx *ctx)
{ … }
int mv88e6xxx_devlink_param_set(struct dsa_switch *ds, u32 id,
struct devlink_param_gset_ctx *ctx)
{ … }
static const struct devlink_param mv88e6xxx_devlink_params[] = …;
int mv88e6xxx_setup_devlink_params(struct dsa_switch *ds)
{ … }
void mv88e6xxx_teardown_devlink_params(struct dsa_switch *ds)
{ … }
enum mv88e6xxx_devlink_resource_id { … };
static u64 mv88e6xxx_devlink_atu_bin_get(struct mv88e6xxx_chip *chip,
u16 bin)
{ … }
static u64 mv88e6xxx_devlink_atu_bin_0_get(void *priv)
{ … }
static u64 mv88e6xxx_devlink_atu_bin_1_get(void *priv)
{ … }
static u64 mv88e6xxx_devlink_atu_bin_2_get(void *priv)
{ … }
static u64 mv88e6xxx_devlink_atu_bin_3_get(void *priv)
{ … }
static u64 mv88e6xxx_devlink_atu_get(void *priv)
{ … }
int mv88e6xxx_setup_devlink_resources(struct dsa_switch *ds)
{ … }
static int mv88e6xxx_region_global_snapshot(struct devlink *dl,
const struct devlink_region_ops *ops,
struct netlink_ext_ack *extack,
u8 **data)
{ … }
struct mv88e6xxx_devlink_atu_entry { … };
static int mv88e6xxx_region_atu_snapshot_fid(struct mv88e6xxx_chip *chip,
int fid,
struct mv88e6xxx_devlink_atu_entry *table,
int *count)
{ … }
static int mv88e6xxx_region_atu_snapshot(struct devlink *dl,
const struct devlink_region_ops *ops,
struct netlink_ext_ack *extack,
u8 **data)
{ … }
struct mv88e6xxx_devlink_vtu_entry { … };
static int mv88e6xxx_region_vtu_snapshot(struct devlink *dl,
const struct devlink_region_ops *ops,
struct netlink_ext_ack *extack,
u8 **data)
{ … }
struct mv88e6xxx_devlink_stu_entry { … };
static int mv88e6xxx_region_stu_snapshot(struct devlink *dl,
const struct devlink_region_ops *ops,
struct netlink_ext_ack *extack,
u8 **data)
{ … }
static int mv88e6xxx_region_pvt_snapshot(struct devlink *dl,
const struct devlink_region_ops *ops,
struct netlink_ext_ack *extack,
u8 **data)
{ … }
static int mv88e6xxx_region_port_snapshot(struct devlink_port *devlink_port,
const struct devlink_port_region_ops *ops,
struct netlink_ext_ack *extack,
u8 **data)
{ … }
static struct mv88e6xxx_region_priv mv88e6xxx_region_global1_priv = …;
static struct devlink_region_ops mv88e6xxx_region_global1_ops = …;
static struct mv88e6xxx_region_priv mv88e6xxx_region_global2_priv = …;
static struct devlink_region_ops mv88e6xxx_region_global2_ops = …;
static struct devlink_region_ops mv88e6xxx_region_atu_ops = …;
static struct devlink_region_ops mv88e6xxx_region_vtu_ops = …;
static struct devlink_region_ops mv88e6xxx_region_stu_ops = …;
static struct devlink_region_ops mv88e6xxx_region_pvt_ops = …;
static const struct devlink_port_region_ops mv88e6xxx_region_port_ops = …;
struct mv88e6xxx_region { … };
static struct mv88e6xxx_region mv88e6xxx_regions[] = …;
void mv88e6xxx_teardown_devlink_regions_global(struct dsa_switch *ds)
{ … }
void mv88e6xxx_teardown_devlink_regions_port(struct dsa_switch *ds, int port)
{ … }
int mv88e6xxx_setup_devlink_regions_port(struct dsa_switch *ds, int port)
{ … }
int mv88e6xxx_setup_devlink_regions_global(struct dsa_switch *ds)
{ … }
int mv88e6xxx_devlink_info_get(struct dsa_switch *ds,
struct devlink_info_req *req,
struct netlink_ext_ack *extack)
{ … }