Skip to content

Commit

Permalink
net: dsa: microchip: enable MTU normalization for KSZ8795 and KSZ9477…
Browse files Browse the repository at this point in the history
… compatible switches

KSZ8795 and KSZ9477 compatible series of switches use global max frame
size configuration register. So, enable MTU normalization for this reason.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Acked-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
  • Loading branch information
Oleksij Rempel authored and Paolo Abeni committed Dec 7, 2022
1 parent 29d1e85 commit 6b30cfa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/dsa/microchip/ksz8795.c
Original file line number Diff line number Diff line change
Expand Up @@ -1357,6 +1357,8 @@ int ksz8_setup(struct dsa_switch *ds)
struct ksz_device *dev = ds->priv;
int i;

ds->mtu_enforcement_ingress = true;

ksz_cfg(dev, S_REPLACE_VID_CTRL, SW_FLOW_CTRL, true);

/* Enable automatic fast aging when link changed detected. */
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/dsa/microchip/ksz9477.c
Original file line number Diff line number Diff line change
Expand Up @@ -1134,6 +1134,8 @@ int ksz9477_setup(struct dsa_switch *ds)
struct ksz_device *dev = ds->priv;
int ret = 0;

ds->mtu_enforcement_ingress = true;

/* Required for port partitioning. */
ksz9477_cfg32(dev, REG_SW_QM_CTRL__4, UNICAST_VLAN_BOUNDARY,
true);
Expand Down

0 comments on commit 6b30cfa

Please sign in to comment.