Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp119618iof; Sun, 5 Jun 2022 22:58:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydEkkud3SC3AB/KnlhRKvyoKjykGFVsWe6ksUq68lG1B1SSJOLod35+kBBXWyhn3n4akQT X-Received: by 2002:a17:902:e78e:b0:163:caf2:2ef2 with SMTP id cp14-20020a170902e78e00b00163caf22ef2mr21964317plb.3.1654495089314; Sun, 05 Jun 2022 22:58:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654495089; cv=none; d=google.com; s=arc-20160816; b=PCAYuTzkayyGWVp2onlnjNharTCjneud3XBH4EgWljt0MTvT6nxmw4BBGhqoJeFtnY T1gxIV8EYzcpB5RLp7nXzr6SbfuJ2EWr05jY6El8ad9FsuRNu8cNtKJObNysp1z1NP9h sGVW6dsILDZOqN1lcZENPvBxdTXUG/Fu0B/qy/XRFWuseaCteQwGECTr3ffZmAgQsX0z Z7vFLc6dlcpjy3+UQguKpkC7KrLNUbrrT6KI9AIFIFlp5UfUI4oaSJbZ79L2Ar128153 kUbPwbzMEomlReJslcYbf292t/8giF3JHGHd/a9O69WMSGaVCVgL2YUt5BLFPOtmAlXg 37Dg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8C+oLgKRwASN4KZW7lQHbiLlRt5Q0mVvwUeiwSnPHms=; b=t5v81B3sJQXOu4aixgSBIeIYTLeV8mUpB6g1bC9NJZPgH3yUALISj5reBF6SbZ4byx Wff/HHD0vrSVj+/i61edCkG6oGybcA+aiFUNVzI+WLcudz1kTPy3Q3w5PHmbYrKUiY+I FVBolM7Y1//LePjV/ourxSeAyOBBCuC3anzdzc6j2VDptIjVWba6WBUhEv4X82cWxakM RS+oiYECkjxpK2oKkBYqvcsSZZtCZIz1QMNSR1HCWXLt7jWaOsUCfrt/cS04W8qX2wNU B9Pvlcff6ewcVaLR8ieIx6ZJH5rIs6LCQOx8G90YvATUsQjfO9qcnhnDGNxEShq7qvEC 7/xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wygI1G6k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id o10-20020a17090aeb8a00b001e2c1e7fe25si22674744pjy.113.2022.06.05.22.58.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 22:58:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wygI1G6k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 442552E6EE6; Sun, 5 Jun 2022 21:46:31 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346376AbiFCSAP (ORCPT + 99 others); Fri, 3 Jun 2022 14:00:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347197AbiFCRwG (ORCPT ); Fri, 3 Jun 2022 13:52:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C5E658380; Fri, 3 Jun 2022 10:50:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DCF3360A0F; Fri, 3 Jun 2022 17:50:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F05CCC385A9; Fri, 3 Jun 2022 17:50:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654278620; bh=rhSReVfYA015Yqcr13AeznBlSDShTNdEP+EIElwOAPE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wygI1G6kaSgCTpR/GGrpEznWnAbKY6KXGVwNqETx3kVKuCI4LH/EGZkVXjoJSn8Yb KH2qgaZ1PpztoRsPB3hgKtDVzakkJf6vHttrnEs+2WyZDzsAf4cSt6cgElm3uSxzhL SV9oplhNmgyoMvUT6IId0MlUx4CgPhs/npxlN2jw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Wilder , Dylan Hung , Joel Stanley , "David S. Miller" , Sasha Levin Subject: [PATCH 5.15 07/66] net: ftgmac100: Disable hardware checksum on AST2600 Date: Fri, 3 Jun 2022 19:42:47 +0200 Message-Id: <20220603173820.878999533@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220603173820.663747061@linuxfoundation.org> References: <20220603173820.663747061@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 From: Joel Stanley [ Upstream commit 6fd45e79e8b93b8d22fb8fe22c32fbad7e9190bd ] The AST2600 when using the i210 NIC over NC-SI has been observed to produce incorrect checksum results with specific MTU values. This was first observed when sending data across a long distance set of networks. On a local network, the following test was performed using a 1MB file of random data. On the receiver run this script: #!/bin/bash while [ 1 ]; do # Zero the stats nstat -r > /dev/null nc -l 9899 > test-file # Check for checksum errors TcpInCsumErrors=$(nstat | grep TcpInCsumErrors) if [ -z "$TcpInCsumErrors" ]; then echo No TcpInCsumErrors else echo TcpInCsumErrors = $TcpInCsumErrors fi done On an AST2600 system: # nc 9899 < test-file The test was repeated with various MTU values: # ip link set mtu 1410 dev eth0 The observed results: 1500 - good 1434 - bad 1400 - good 1410 - bad 1420 - good The test was repeated after disabling tx checksumming: # ethtool -K eth0 tx-checksumming off And all MTU values tested resulted in transfers without error. An issue with the driver cannot be ruled out, however there has been no bug discovered so far. David has done the work to take the original bug report of slow data transfer between long distance connections and triaged it down to this test case. The vendor suspects this this is a hardware issue when using NC-SI. The fixes line refers to the patch that introduced AST2600 support. Reported-by: David Wilder Reviewed-by: Dylan Hung Signed-off-by: Joel Stanley Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/faraday/ftgmac100.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c index e1df2dc810a2..0b833572205f 100644 --- a/drivers/net/ethernet/faraday/ftgmac100.c +++ b/drivers/net/ethernet/faraday/ftgmac100.c @@ -1910,6 +1910,11 @@ static int ftgmac100_probe(struct platform_device *pdev) /* AST2400 doesn't have working HW checksum generation */ if (np && (of_device_is_compatible(np, "aspeed,ast2400-mac"))) netdev->hw_features &= ~NETIF_F_HW_CSUM; + + /* AST2600 tx checksum with NCSI is broken */ + if (priv->use_ncsi && of_device_is_compatible(np, "aspeed,ast2600-mac")) + netdev->hw_features &= ~NETIF_F_HW_CSUM; + if (np && of_get_property(np, "no-hw-checksum", NULL)) netdev->hw_features &= ~(NETIF_F_HW_CSUM | NETIF_F_RXCSUM); netdev->features |= netdev->hw_features; -- 2.35.1