From patchwork Thu Dec 10 17:03:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qingfang Deng X-Patchwork-Id: 342672 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0C9FC433FE for ; Thu, 10 Dec 2020 17:04:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AABE822D6E for ; Thu, 10 Dec 2020 17:04:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390923AbgLJRET (ORCPT ); Thu, 10 Dec 2020 12:04:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388290AbgLJREJ (ORCPT ); Thu, 10 Dec 2020 12:04:09 -0500 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97025C0617A7 for ; Thu, 10 Dec 2020 09:03:29 -0800 (PST) Received: by mail-pf1-x442.google.com with SMTP id p4so4690862pfg.0 for ; Thu, 10 Dec 2020 09:03:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=eRcirKkczqUwPjfzJ1m1K31YYmn9lbP0Ojco8kH6qww=; b=fEUkmcpMf+8Vk4ezAJBrMWMvdJAxJgERulmR6uMHHh9CJKjkhoIk9w4eH9cL1AXk79 7Eb0EkNThEnn2fzZYxiahVyH59Z0LlGhy0iUFCZ4qgSopEf5TYLJ94MzHLgaFkHKLt5F hLd+I5mawe4HTX1q/7J9RQSRFW/1Eb0Mp5I04OI2pXsIKhHTbYYDTSANznv5XUThXOo7 gUpOBX2FHvCZyG18eKWbdXRa96lm5sHKLjFKbIRJEAaEPcofYHdTdVWpdT0i6m+kDUJ5 cTTnaFW0aAbrKSxXUfymEvVt73mTKIL2rYTW5PVPjhe26nNyplTrj09EXTQC+YdZ14lh AkUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=eRcirKkczqUwPjfzJ1m1K31YYmn9lbP0Ojco8kH6qww=; b=bfQrhJV8r+D+7uxOTfA4xGZtgAtc3NRm2BKHlCtYJbQ8bQ0E4I9x2o3MdUDlsHuGMb kAlu6PQIz1J1q/bhmUvchdWN0lCb0oKHQduo+Qm0CVE4OAd6sm57YsPqzTGusxzTCEx5 Z1RxqwIYsCpit5qsYPLY9QIJ/LMucKmixFCzgYnyfVJ2aPPWy8rqpY27AKzSrfd8Wpsf N3EkiKB6VWQnyCsQIw+ZwyMfG0nszXL1dWLYcaOaGJ5KyPRJB1c+SjjWCmj3//amtwmg Ec9ddLt9ljY4jNn+lwAOwJNHntgIEUt1otpwpwnvYdhcWwGJHjiPRdEcW2Rc4sbTF9Uw o5fA== X-Gm-Message-State: AOAM533jgXC7fbUaihDdEWL203KNrQh+thDJw+myoxlphso9dZkGuxOJ MrKdexGgaDQv4MWXzq6aABBpRQdlETFUBbbXycA= X-Google-Smtp-Source: ABdhPJyEWgOjT095zKQ46nRfysxXucdy1M7MntGxBJ3lkXo3bYoyFlRe2bxAORpp4HAYHVJeLIEKCA== X-Received: by 2002:a17:90a:8b8a:: with SMTP id z10mr8672792pjn.67.1607619809005; Thu, 10 Dec 2020 09:03:29 -0800 (PST) Received: from container-ubuntu.lan ([171.211.29.210]) by smtp.gmail.com with ESMTPSA id u12sm6495318pfn.88.2020.12.10.09.03.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Dec 2020 09:03:28 -0800 (PST) From: DENG Qingfang To: netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, Sean Wang , Landen Chao , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S . Miller" , Jakub Kicinski , Matthias Brugger , Russell King Subject: [PATCH net-next] net: dsa: mt7530: enable MTU normalization Date: Fri, 11 Dec 2020 01:03:22 +0800 Message-Id: <20201210170322.3433-1-dqfext@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org MT7530 has a global RX length register, so we are actually changing its MRU. Enable MTU normalization for this reason. Signed-off-by: DENG Qingfang --- drivers/net/dsa/mt7530.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index 99bf8fed6536..a67cac15a724 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -1657,6 +1657,7 @@ mt7530_setup(struct dsa_switch *ds) */ dn = dsa_to_port(ds, MT7530_CPU_PORT)->master->dev.of_node->parent; ds->configure_vlan_while_not_filtering = true; + ds->mtu_enforcement_ingress = true; if (priv->id == ID_MT7530) { regulator_set_voltage(priv->core_pwr, 1000000, 1000000); @@ -1895,6 +1896,7 @@ mt7531_setup(struct dsa_switch *ds) } ds->configure_vlan_while_not_filtering = true; + ds->mtu_enforcement_ingress = true; /* Flush the FDB table */ ret = mt7530_fdb_cmd(priv, MT7530_FDB_FLUSH, NULL);