Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp106797iof; Sun, 5 Jun 2022 22:35:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLxFT20MBYxkVLyoElMz92j8qd/Tj6KZ0UFWbrQCgscC7BUoGKmW+ZiYNtlQoWJYFloWx9 X-Received: by 2002:a65:6cc9:0:b0:399:26da:29af with SMTP id g9-20020a656cc9000000b0039926da29afmr19545574pgw.489.1654493715514; Sun, 05 Jun 2022 22:35:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654493715; cv=none; d=google.com; s=arc-20160816; b=hdXLjwPYzYZHvTZnkhLLGdeWmtOuAVB7BsaraDKNNZ6NsOK8fQjGCHIUnBXa4dZaf2 kgN4u2/ygTLfh/Kpw+X0a9k+dJnGAaVf/ptv3OpsXBVVH7D32Vq+IssKKuM2N57Ba6a9 Pt8dETVhSuuOG6t0aZZwpA9e0facls4I+iF51tIgBy7tluAnFcMQKjv5X+8Uj+/Un/ik dz0LyR3VhZaLp6Begdz9svMR4zbNOHI/v+L+spqkyAt3CDKEcblmPvxeBOIQURjFtAZk nBHRWNH0Y8Dj8yYpGSuxGmtSVl54JXvDmb9MRn99r5ApmRntwQLM+O1RbxK8cKKh4EZZ hEHw== 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=HY22+W47rF2TqJG1n9q8gAGl1tTnrvL38RowIH0OhwU=; b=GC8WaSUdggrO77jq3+TvGrejnoUVIMuarHeEO3G0sQ0nznewS6zjdPllkAiQjFGNRx hb74byLd/DOIwNnjlT9NbAbfWMs9Yw+sFPz/Nbt2IdK2oKQ+KT5esTz8iqLgYcPSv7CQ q81cWpIRpLo96pofQYYu/eLaSachdR2EHvNDO60alxLmVj7AZuiqfdJLWxWLL9GyK1pj 023erh+266m+Z+S+E/PFgh3aPOHFqvYqvYstFvxxPLImlAM2aR5fVM8fC1IuOBo6Zhdo lIRQSD+RMQe3br9L3TgzPY1bU8E5ITOGS871SulKx6tdvPghUBqaD+yH/a/YLcXcfVJV HyJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kIX1UJta; 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 p7-20020a170902ebc700b0016778c1fb03si4503200plg.15.2022.06.05.22.35.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 22:35:15 -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=kIX1UJta; 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 3CBEB230985; Sun, 5 Jun 2022 21:35:32 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344666AbiFCRlz (ORCPT + 99 others); Fri, 3 Jun 2022 13:41:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344847AbiFCRlM (ORCPT ); Fri, 3 Jun 2022 13:41:12 -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 8A80453E15; Fri, 3 Jun 2022 10:40:56 -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 18A3C61AFE; Fri, 3 Jun 2022 17:40:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E7A3C385B8; Fri, 3 Jun 2022 17:40:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654278055; bh=DZ/F7hfto6+zZNrsEDnnEnfL6SgqUExG+EhCpoew7Y8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kIX1UJtaWGGgKvsg6MtCPut/5WFE1mh9emK1oYuNhHSLID0iV6gm+jk/1OWRCrWgX 6/XQlTdZrg/MAgN7ObFyIHEAAUOeBA1PietGg0LclySRCWYSIZjj4LpIlzRMlKkLNk MGmk9QSlFJ4fcTCX/X7kgxtGrVChSXTjWp+LNKi4= 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.14 08/23] net: ftgmac100: Disable hardware checksum on AST2600 Date: Fri, 3 Jun 2022 19:39:35 +0200 Message-Id: <20220603173814.619431272@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220603173814.362515009@linuxfoundation.org> References: <20220603173814.362515009@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 f35c5dbe54ee..a1caca6accf3 100644 --- a/drivers/net/ethernet/faraday/ftgmac100.c +++ b/drivers/net/ethernet/faraday/ftgmac100.c @@ -1845,6 +1845,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