From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BFE47189900; Tue, 30 Jul 2024 16:46:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722358012; cv=none; b=Lp9WXZ8AZ99Tfc9Mz4GqsWINE6HKvaieuNsmpBMv5zRjw8dLICFmbrwWp/UIHI2p4LJINyq8yClHFYjK0tzkNinQ6DKF/XjhCYUGDgp2/wS4vK8hdxAALNnicCtegrQyzUteGDjAyyupflzbnj+syNgmgfA9xlTylRKo0N2UynI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722358012; c=relaxed/simple; bh=dos7FBrflt6ouehK+u3vLhuNoqbO938qJMz2qwPBXLI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=K5uOIjL7m9ktvPmEmFf9vTWOUBEUGydAKePGDAnO6l68aYmZFo2xfoz8+u2wKuVB+U5EjT/fVibIHgkbrgMEy2NLTPCr+1W80SmiViDleg/G08DnGUlrNuAxETvzv7upisyRj1RsS4aM+1cMeVC1XBb/7JTKizea25jVdSP2nYc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sIHgjeJt; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="sIHgjeJt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3725EC32782; Tue, 30 Jul 2024 16:46:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1722358012; bh=dos7FBrflt6ouehK+u3vLhuNoqbO938qJMz2qwPBXLI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sIHgjeJt/6jpEYxIjn/NAYyltqw+xV/8si2123EHhc9TKcXAeSBzBJ/nGiaW1X85A KXkQvHbQb7ue5ZwdmZ+8GTFA1SA0PmUTZ/ekYjlr6z0/Mi2IR01sX80aMWJqVBA7Dd 4u4fp4uMynfvp5A0VFllgR686GE6Na9uFKqvzodg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Vladimir Oltean , Martin Willi , Paolo Abeni , Sasha Levin Subject: [PATCH 6.6 317/568] net: dsa: mv88e6xxx: Limit chip-wide frame size config to CPU ports Date: Tue, 30 Jul 2024 17:47:04 +0200 Message-ID: <20240730151652.260546453@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240730151639.792277039@linuxfoundation.org> References: <20240730151639.792277039@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Martin Willi [ Upstream commit 66b6095c264e1b4e0a441c6329861806504e06c6 ] Marvell chips not supporting per-port jumbo frame size configurations use a chip-wide frame size configuration. In the commit referenced with the Fixes tag, the setting is applied just for the last port changing its MTU. While configuring CPU ports accounts for tagger overhead, user ports do not. When setting the MTU for a user port, the chip-wide setting is reduced to not include the tagger overhead, resulting in an potentially insufficient maximum frame size for the CPU port. Specifically, sending full-size frames from the CPU port on a MV88E6097 having a user port MTU of 1500 bytes results in dropped frames. As, by design, the CPU port MTU is adjusted for any user port change, apply the chip-wide setting only for CPU ports. Fixes: 1baf0fac10fb ("net: dsa: mv88e6xxx: Use chip-wide max frame size for MTU") Suggested-by: Vladimir Oltean Signed-off-by: Martin Willi Reviewed-by: Vladimir Oltean Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- drivers/net/dsa/mv88e6xxx/chip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 354d4af134562..3877744193e2a 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -3490,7 +3490,8 @@ static int mv88e6xxx_change_mtu(struct dsa_switch *ds, int port, int new_mtu) mv88e6xxx_reg_lock(chip); if (chip->info->ops->port_set_jumbo_size) ret = chip->info->ops->port_set_jumbo_size(chip, port, new_mtu); - else if (chip->info->ops->set_max_frame_size) + else if (chip->info->ops->set_max_frame_size && + dsa_is_cpu_port(ds, port)) ret = chip->info->ops->set_max_frame_size(chip, new_mtu); mv88e6xxx_reg_unlock(chip); -- 2.43.0