On Thu, 26 Mar 2020 at 01:22, Florian Fainelli [off-list ref] wrote:
On 3/25/2020 8:22 AM, Vladimir Oltean wrote:
quoted
From: Murali Krishna Policharla <redacted>
Add b53_change_mtu API to configure mtu settings in B53 switch. Enable
jumbo frame support if configured mtu size is for jumbo frame. Also
configure BCM583XX devices to send and receive jumbo frames when ports
are configured with 10/100 Mbps speed.
Signed-off-by: Murali Krishna Policharla <redacted>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
[snip]
quoted
@@ -658,6 +659,14 @@ static void b53_enable_cpu_port(struct b53_device *dev, int port)
b53_brcm_hdr_setup(dev->ds, port);
b53_br_egress_floods(dev->ds, port, true, true);
+
+ b53_read32(dev, B53_JUMBO_PAGE, dev->jumbo_pm_reg, &port_mask);
+
+ if (dev->chip_id == BCM583XX_DEVICE_ID)
+ port_mask |= JPM_10_100_JUMBO_EN;
+
+ port_mask |= BIT(port);
+ b53_write32(dev, B53_JUMBO_PAGE, dev->jumbo_pm_reg, port_mask);
This should eventually be brought into b53_set_jumbo() where we already
have existing logic to configure whether to accept jumbo frames and for
10/100M ports, too, not strictly necessary for now though:
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
What do you mean should be done? This?
if (!is5325(dev) && !is5365(dev))
- b53_set_jumbo(dev, dev->enable_jumbo, false);
+ b53_set_jumbo(dev, dev->enable_jumbo, is58xx(dev));
Regards,
-Vladimir