[v7,1/3] dsa: marvell: Define .set_max_frame_size() function for mv88e6250 SoC family
Message ID | 20230523142912.2086985-2-lukma@denx.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2196575vqo; Tue, 23 May 2023 07:45:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6a2tLl5XMRfxb0g91FyjEDXsGxvkcmQgR+mXK92i45f/T5/Hg4UAF/+J69kAx6Igm2BitS X-Received: by 2002:a05:6a20:4403:b0:10b:447c:dff2 with SMTP id ce3-20020a056a20440300b0010b447cdff2mr9407443pzb.43.1684853157410; Tue, 23 May 2023 07:45:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684853157; cv=none; d=google.com; s=arc-20160816; b=Gd/3e0N23XH4YWkTfG9xLea9CSFmO8CVKIUB0ksHKnvjZKUfFnjxe9/AlQzi1wO+83 MsqfqX1mksq9KMVby/41WM7N3GaGK4nAoKr3P//3fFntLc+7usIRHgypaJl5ZMFLJpfH CDQ0tIxWJwWGlSWivR0mMOIKrrsexOIYMZ6GevOS2fQOCkDVopYov2ToWkn9toR3abOp A030CAmDL8/RzDI6rCoa9NpwRnVBOzHN5V89Jk6u+xqhjAQSGxkpC/+w853BJ01I/XBd 0TboZNtABDdzgOfgwrqD8pIBGsXhEClwp7I0gyhjyTMtDqmzWGbV7lFNy1QoXv2Anpd3 tT8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nyydpcvCYcJ2fkOSjPCLykhfksngix993L7ypy8jbD0=; b=YWs6Z953qZo8mPdM5LCwBDeja4swwTqjQDNCmKzfzy2cP/ST2+ej76z0z0GQa2G1L0 6fnb5lagXGyZS3+1I6IRogAOacoOD6zm6viRTVx4sHKXHfarR0Djq4nQS3KH48XtwovI QMEFMH05RfVoiGK0xG7jlz7ibc+5WoGGIvfQBERqEF/PUUL+chMp0maBMy2PwYQCk9GE 2YkmhdNQuNzRJlgmfy77dxMySuWI1gfmrRkVSLleI9lxTue6aoLk710yFElN68wrHZ3W QllLmm2JqXLvIeo+iQAUQBTeUQ/UNGKF3FbsLWKbW1stc7lKRVAiM8+phNnx/APpJkVm RlMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=pyaaTNuv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=denx.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k192-20020a633dc9000000b0053ef4692839si1001926pga.819.2023.05.23.07.45.41; Tue, 23 May 2023 07:45:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=pyaaTNuv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=denx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236909AbjEWO3g (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Tue, 23 May 2023 10:29:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234679AbjEWO3f (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 23 May 2023 10:29:35 -0400 Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E9CEDD; Tue, 23 May 2023 07:29:32 -0700 (PDT) Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: lukma@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id BA459854DA; Tue, 23 May 2023 16:29:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1684852170; bh=nyydpcvCYcJ2fkOSjPCLykhfksngix993L7ypy8jbD0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pyaaTNuvLGUaIL7yqBimu9B657MlehkS853B3qB0Wp/L15dQgCxtOT6R5kBq1a9k6 LMlLfnWUs9wQ/PZ37QUYHRWbFYGlCraXC+nupvOr1U4DhORUIvhj9MVg97LJ/rz+kO hAzgE0+88MgwHtLj0RuIuSIuOMUcYx9qjIbIIB5Bv2r9rrlplxO2r5YgKDBE5r9ABB nSYNoxx8XuFnSz0IlENoCTxdWEYy1uL7gGKbaKGgjSXLV6Spa6u0t3+XuZQTTK/L8s QMg6Ro+57AzhSoPcF4CUj8JOBu97QZsZU8CePt9/gAmCGvjcRybXVdr+cPE1gCE9Yn kHvDTdBv4f/8A== From: Lukasz Majewski <lukma@denx.de> To: Andrew Lunn <andrew@lunn.ch>, Vladimir Oltean <olteanv@gmail.com>, Russell King <linux@armlinux.org.uk> Cc: Eric Dumazet <edumazet@google.com>, Florian Fainelli <f.fainelli@gmail.com>, "David S. Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Alexander Duyck <alexander.duyck@gmail.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Lukasz Majewski <lukma@denx.de> Subject: [PATCH v7 1/3] dsa: marvell: Define .set_max_frame_size() function for mv88e6250 SoC family Date: Tue, 23 May 2023 16:29:10 +0200 Message-Id: <20230523142912.2086985-2-lukma@denx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230523142912.2086985-1-lukma@denx.de> References: <20230523142912.2086985-1-lukma@denx.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766696584863871378?= X-GMAIL-MSGID: =?utf-8?q?1766696584863871378?= |
Series |
dsa: marvell: Add support for mv88e6071 and 6020 switches
|
|
Commit Message
Lukasz Majewski
May 23, 2023, 2:29 p.m. UTC
Switches from mv88e6250 family (the marketing name - "Link Street",
including mv88e6020 and mv88e6071) need the possibility to setup the
maximal frame size, as they support frames up to 2048 bytes.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
Changes for v6:
- New patch
Changes for v7:
- Update commit message
---
drivers/net/dsa/mv88e6xxx/chip.c | 1 +
1 file changed, 1 insertion(+)
Comments
On Tue, May 23, 2023 at 04:29:10PM +0200, Lukasz Majewski wrote: > Switches from mv88e6250 family (the marketing name - "Link Street", > including mv88e6020 and mv88e6071) need the possibility to setup the > maximal frame size, as they support frames up to 2048 bytes. > > Signed-off-by: Lukasz Majewski <lukma@denx.de> Adding this function doesn't allow the "possibility" for a larger frame size. Adding it changes the value returned from mv88e6xxx_get_max_mtu() to be a larger frame size, so all switches that make use of mv88e6250_ops will be expected to support this larger frame size. Do we know whether that is true? There were patches floating about a while ago that specified the maximum size in struct mv88e6xxx_info, but it seems those died a death.
Also, subject line should be "net: dsa: ..."
Hi Russell, > Also, subject line should be "net: dsa: ..." > Ok, I will correct that subject line. Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
On Wed, May 24, 2023 at 02:06:36PM +0200, Lukasz Majewski wrote: > Hi Russell, > > > Also, subject line should be "net: dsa: ..." > > > > Ok, I will correct that subject line. Also, please use "mv88e6xxx" rather than "marvell" - consistency in the subject lines, particularly when referring to a part of the kernel tree is desirable.
Hi Russell, > On Tue, May 23, 2023 at 04:29:10PM +0200, Lukasz Majewski wrote: > > Switches from mv88e6250 family (the marketing name - "Link Street", > > including mv88e6020 and mv88e6071) need the possibility to setup the > > maximal frame size, as they support frames up to 2048 bytes. > > > > Signed-off-by: Lukasz Majewski <lukma@denx.de> > > Adding this function doesn't allow the "possibility" for a larger > frame size. Adding it changes the value returned from > mv88e6xxx_get_max_mtu() to be a larger frame size, so all switches > that make use of mv88e6250_ops will be expected to support this > larger frame size. Do we know whether that is true? > According to functional specification - the 6070, 6071, 6250, 6020 and 6220 have "Max Frame Size" of 2048 bytes. The mv88e6xxx_get_max_mtu() now will: return 1632 - VLAN_ETH_HLEN - EDSA_HLEN - ETH_FCS_LEN; which is acceptable and safe for this family of chips. > There were patches floating about a while ago that specified the > maximum size in struct mv88e6xxx_info, but it seems those died a > death. > Those patches seems to not be strictly required after Vladimir's work. The v7 provides what I need, so yes - extra patches from v6 can be discarded. Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 64a2f2f83735..b5e43dd40431 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -5043,6 +5043,7 @@ static const struct mv88e6xxx_ops mv88e6250_ops = { .avb_ops = &mv88e6352_avb_ops, .ptp_ops = &mv88e6250_ptp_ops, .phylink_get_caps = mv88e6250_phylink_get_caps, + .set_max_frame_size = mv88e6185_g1_set_max_frame_size, }; static const struct mv88e6xxx_ops mv88e6290_ops = {