diff options
author | Arun Ramadoss <arun.ramadoss@microchip.com> | 2022-06-17 11:42:55 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2022-06-21 16:26:45 +0300 |
commit | 1fe94f542e66b5de526233762ed528e7d3b66ff9 (patch) | |
tree | d11e5c4f72ca0e1ff679c1391eafa0f1649066d4 /drivers/net/dsa/microchip/ksz_common.h | |
parent | e587be759e6e4f5a257d1f2bd7f2883a6397a6e8 (diff) | |
download | linux-1fe94f542e66b5de526233762ed528e7d3b66ff9.tar.xz |
net: dsa: microchip: move get_phy_flags & mtu to ksz_common
This patch assigns the get_phy_flags & mtu hook of ksz8795 and ksz9477
in dsa_switch_ops to ksz_common. For get_phy_flags hooks,checks whether
the chip is ksz8863/kss8793 then it returns error for port1.
Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz_common.h')
-rw-r--r-- | drivers/net/dsa/microchip/ksz_common.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h index e507e951ce2b..ebcfa688ea2c 100644 --- a/drivers/net/dsa/microchip/ksz_common.h +++ b/drivers/net/dsa/microchip/ksz_common.h @@ -200,6 +200,8 @@ struct ksz_dev_ops { struct dsa_db db); void (*get_caps)(struct ksz_device *dev, int port, struct phylink_config *config); + int (*change_mtu)(struct ksz_device *dev, int port, int mtu); + int (*max_mtu)(struct ksz_device *dev, int port); void (*freeze_mib)(struct ksz_device *dev, int port, bool freeze); void (*port_init_cnt)(struct ksz_device *dev, int port); int (*shutdown)(struct ksz_device *dev); @@ -227,6 +229,7 @@ extern const struct ksz_chip_data ksz_switch_chips[]; int ksz_phy_read16(struct dsa_switch *ds, int addr, int reg); int ksz_phy_write16(struct dsa_switch *ds, int addr, int reg, u16 val); +u32 ksz_get_phy_flags(struct dsa_switch *ds, int port); void ksz_mac_link_down(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface); int ksz_sset_count(struct dsa_switch *ds, int port, int sset); @@ -267,6 +270,8 @@ int ksz_port_mirror_add(struct dsa_switch *ds, int port, bool ingress, struct netlink_ext_ack *extack); void ksz_port_mirror_del(struct dsa_switch *ds, int port, struct dsa_mall_mirror_tc_entry *mirror); +int ksz_change_mtu(struct dsa_switch *ds, int port, int mtu); +int ksz_max_mtu(struct dsa_switch *ds, int port); /* Common register access functions */ |