Re: [PATCH v2 net-next 06/10] net: dsa: b53: Add MTU configuration support

From
Florian Fainelli <f.fainelli@gmail.com>
Date
2020-03-25 23:22:05
Reply to
Vladimir Oltean, 2020-03-25

On 3/25/2020 8:22 AM, Vladimir Oltean wrote:
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 hunk ↗ jump to hunk
@@ -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
Thread (37 messages) 37 messages, 6 authors, last reply 2020-03-26
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help