Received: by 2002:a05:6358:795:b0:dc:4c66:fc3e with SMTP id n21csp2279031rwj; Sun, 30 Oct 2022 14:45:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6o3cuPmxjtIiQOawMlAZ4cdnqah98iqEv5zTWsXIRcXrQXDZ1ouTw6U/zW7Xf/peCruQPn X-Received: by 2002:a05:6402:294f:b0:461:f5ce:31e8 with SMTP id ed15-20020a056402294f00b00461f5ce31e8mr10393823edb.363.1667166328529; Sun, 30 Oct 2022 14:45:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667166328; cv=none; d=google.com; s=arc-20160816; b=tQimXiofbSuGXH/a0BuuDhFmCzJ7+/FIS09Npj3kJbsK7WHrwSymw0CvxpFZ6NOj8D w0qfr7M20sCZgTBRlY7Hi3ZfJxrNvdmvGBhnEwaE/4SI1SkGAknaUZMn9ITVq6KEFoVN nvPTrNn6g0gTSThLohKxPdPcmIDQqmozhVYWkVj4eyutsptsuL09Hj8DQiqInJ99jX6g +YgnRKEpn104aJx4+FYGuZxSPXiGTbwy1XAFNSSAPrfkZbfi3qTENeL5oXDMvzAIffCy ntnBM+ZzVfmgMDYw/cxqbPr2kC330V1ovIoEshB25WYsWWI1o+UkIFT1PngN25Cr+hW4 d+cw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=uDetjjSwuE8EgJfT8a24RrT4Tc2S5HODNzqbdoc0gu4=; b=lzSzFgMNm3rlCuAAoCLZerg7polJOTV7JFDNS3Ng8RJ9MzCNfjUzcCK15MM2P/yifL On2y9aEQd6Md0irpm3jjiUD39GGNErXMoYm9iEKY7y40FLabSyrGs/8Hb2YHeGMTiyd7 PFnzlBQRizyRCe+Ou3xjRXFUUlClUIDHb6m2pOr1IpD2NPRvgM/0um7Q1XZ9TVrgbslM EOKU1iRi1f/lOlswMTFq7huDMNLfU/q4Uml7y0SCp6X0hLJCHIKapg66vg49re472P1S sfL+SBSOY677PUwgx4gMMsOFnMFC7sYbBOHR6WnW5X/PLa0Y76JQmbKOVUFaQl2iakB+ AYAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=CWel5ZVU; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i9-20020a1709064fc900b0078e06ba4deasi6636380ejw.218.2022.10.30.14.45.04; Sun, 30 Oct 2022 14:45:28 -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=@microchip.com header.s=mchp header.b=CWel5ZVU; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229718AbiJ3VcN (ORCPT + 99 others); Sun, 30 Oct 2022 17:32:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229893AbiJ3Vb7 (ORCPT ); Sun, 30 Oct 2022 17:31:59 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C8BBB1DE; Sun, 30 Oct 2022 14:31:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1667165518; x=1698701518; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=yF+CHeWI4UiDbUU7IwMxj8YjpjdcFZ5iBSnZRE+nm6s=; b=CWel5ZVUj7ZgFJtNu+6hGkzS+vLl6iPeeQiUaFT59M3C5DS+9nuRBsL4 m2HJUMcQo2cFwn8hjEWLTzGbOrqLgq7YQ+ahU79MdeUCIOUYjPkmCeeh2 YfeNpgWaj9y8T9QLZ9fJAve5U7E3kCdLC9j5pE0QC43Q+0sVNeujNFZOn Tzl+FEnCr41p3ySL912gz8lr6HTsrulYds/1COsPUM9cGgUFSbgAAC948 e3CUZLTVnFdM8j3IpEAzjtfTHG+NcmVBdRu+TOf7F80Wax6YkchriAb1D 0PWKUzD62Lui5iN1Mtc5cGhNbdMFxK5bE2wkfRWbl3MTZ92iLlEyHOBN1 A==; X-IronPort-AV: E=Sophos;i="5.95,226,1661842800"; d="scan'208";a="186969027" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 30 Oct 2022 14:31:57 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Sun, 30 Oct 2022 14:31:57 -0700 Received: from soft-dev3-1.microsemi.net (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Sun, 30 Oct 2022 14:31:55 -0700 From: Horatiu Vultur To: , CC: , , , , , Horatiu Vultur Subject: [PATCH net v2 0/3] net: lan966x: Fixes for when MTU is changed Date: Sun, 30 Oct 2022 22:36:33 +0100 Message-ID: <20221030213636.1031408-1-horatiu.vultur@microchip.com> X-Mailer: git-send-email 2.38.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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: X-Mailing-List: linux-kernel@vger.kernel.org There were multiple problems in different parts of the driver when the MTU was changed. The first problem was that the HW was missing to configure the correct value, it was missing ETH_HLEN and ETH_FCS_LEN. The second problem was when vlan filtering was enabled/disabled, the MRU was not adjusted corretly. While the last issue was that the FDMA was calculated wrongly the correct maximum MTU. v1->v2: - when calculating max frame possible to receive add also the vlan tags length Horatiu Vultur (3): net: lan966x: Fix the MTU calculation net: lan966x: Adjust maximum frame size when vlan is enabled/disabled net: lan966x: Fix FDMA when MTU is changed .../net/ethernet/microchip/lan966x/lan966x_fdma.c | 8 ++++++-- .../net/ethernet/microchip/lan966x/lan966x_main.c | 4 ++-- .../net/ethernet/microchip/lan966x/lan966x_main.h | 2 ++ .../net/ethernet/microchip/lan966x/lan966x_regs.h | 15 +++++++++++++++ .../net/ethernet/microchip/lan966x/lan966x_vlan.c | 6 ++++++ 5 files changed, 31 insertions(+), 4 deletions(-) -- 2.38.0