Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp53687iof; Sun, 5 Jun 2022 20:53:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQPqZ8qSLdyF56MOGQ0NdPm9nGrQc5lgEtUI9arWB9RZAvVdpFbxuQh2xzEGjQ8bb2hukZ X-Received: by 2002:a63:f156:0:b0:3ab:ada6:b463 with SMTP id o22-20020a63f156000000b003abada6b463mr19007256pgk.462.1654487630703; Sun, 05 Jun 2022 20:53:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654487630; cv=none; d=google.com; s=arc-20160816; b=PGIUxbjSnT64VCRGi62U4kVPbUxJpgXyjCQsG9hsM8jiZN0W2FVb2sUjHD815GWil1 geG7vIiPQMUrEWlWwEcI+i+ClQ6S3sWaslQMREEXxvTKmWEpf75M1C5PXSxmRdSg0fbH tIq57TkZIseDZAyOUZfnd3urEd4URqtalTGNrJ46nlXtF/88Lw5M51pfljwWBjdd4F33 lLw87DZNXsIq/6mgjsYUgZaZMM7zqCT7RDaAFRfkOW9X7FKT322EWHwYhAEvqb0KA8Ja HgSNwCEh/jjXsPq7EruL5+MuSixpkUoHe+YiL1YO1d03KgE8Kc9/psWRec0QnQogI8tZ f9aw== 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=kTNP3+pUOlni8yOPSpEcznwdvK6uLu/n8PVC1mfFCSQ=; b=F9tmMNBynpjGMe9nL5qNq6p80ZmTURCjbdxUoYOCo9Awt3tNdsF0y9AuZbHh6p0uhB Ls36/hzvWZk6WjZYF5YtiTCMr5oWPFX2I8BEzxU+0P160HadLw0rWsAFLuZN0V7kXswE JBAytazx/jPXnLG+KJO1b30TMYSK0KYW3gOLe7T+N3bC0d2xP6a/RdZU+JeGCYP0BOTJ W9wrOTHF1zlC+CMAqb8ILRa+myRggh/KBoU70PpJ3KT3s8QCwuA31LHbbwogOkRCpMhZ hdTBMogPvZ+dgbz9hGnz6O8EGY4jx7YS4fu1UUHMU0R0QNjfwG8Gvxymp7M0CI8SplxD olSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vWftvVJ8; 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 v14-20020a63d54e000000b003fc9fda69c3si19162379pgi.205.2022.06.05.20.53.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 20:53:50 -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=vWftvVJ8; 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 44E245FF10; Sun, 5 Jun 2022 20:42:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345092AbiFCRph (ORCPT + 99 others); Fri, 3 Jun 2022 13:45:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345146AbiFCRov (ORCPT ); Fri, 3 Jun 2022 13:44:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB23C55363; Fri, 3 Jun 2022 10:42:41 -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 525FD61B48; Fri, 3 Jun 2022 17:42:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A6CCC385A9; Fri, 3 Jun 2022 17:42:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654278160; bh=av2qwQPk8Q+62nOvRzPKh+Ovja46k5PlRTy59g/6TXU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vWftvVJ84vimYvT/1dW1riM7eg6s1k0jjQZTLNBn431Y0mfKO3iaT6Cq2dXjENepG gvTM92rQpuREI9EfuqqTM8utynDtMB+9HW1e31rIb/AjA8iEzzMGApQGqM2vg6Oj92 iEgBeY0/+92lL5W/99gLDAk1kyUJq66LKBgNK4XI= 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 4.19 08/30] net: ftgmac100: Disable hardware checksum on AST2600 Date: Fri, 3 Jun 2022 19:39:36 +0200 Message-Id: <20220603173815.338586291@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220603173815.088143764@linuxfoundation.org> References: <20220603173815.088143764@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 964407deca35..23c019d1278c 100644 --- a/drivers/net/ethernet/faraday/ftgmac100.c +++ b/drivers/net/ethernet/faraday/ftgmac100.c @@ -1869,6 +1869,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