Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp75844iof; Sun, 5 Jun 2022 21:36:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7jKWZAgnMsyJP3hKIJeaz7iHDY8sZ1U5M7wvAVbX8v/zeMQPRNVrPavhZs+Sk7eLHTsCv X-Received: by 2002:a17:902:d5ce:b0:167:6c02:754c with SMTP id g14-20020a170902d5ce00b001676c02754cmr8163468plh.135.1654490167363; Sun, 05 Jun 2022 21:36:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654490167; cv=none; d=google.com; s=arc-20160816; b=by3w/vC+j8Ox975y1yu6i0k/I/WUsw0fudWEMwCp/j9giiG6ZGFH3wQxk2KroqR1X2 pU8FWDll69ELjbJSDfdTpHch2qGikxB1mo0uP0eZ7mIlUHdKNGC5UEh2dXHDcNig1s3Q uxJYpfATo/Kojmm/c6u018Kaxovs4RZUkjJqO2ruhA1CNLEFokYtajEu44U3kiad6nuN CM6d39p2UxHAkmZYvTkme6B+HFmizrtXqmc/wTZPbvEtiagKv5d2JF5RCakWs1B9/ygd 8omsB2f+yc05kDVG+uqiqmMfMzYV0lEj+paVu94JMSkrhIV3fw0YqQrCUbF1lc1fib6r k/FA== 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=LSI30G+1vikO1IuTRLoxKZ5zgo+xF5BS8Q+6O46Hi1w=; b=C1Fk9PVawdIjXIi/LGJEf1eoWT+gtSk8ZNX7n4cm/Jjs4PbgMrIgna6vomWcSB5ACW WGIbNwtF7hBhRVDr4VJHcttZVCs3k2ELQQAVxM5xtgJBaT9/4ueXoIZZWya8JYKkiAqR oagyw2kuua7f1yzmBU1JZ5+NVWLvD9CGFH7Tx0dTKEV6N33dYn6ysQbaUN/o2lILPjYb bTZ2AYbdTyAiWa2LWzRsCS2FoF7lEOsqP8PtrYbf7xbxmEBBUOe82iFzGUpYFFQexBBn yVWqTEHcsbZpFn8fVluQSWv2bQ5ImCc+gTJryRns8fVxvW0GuoEhBrf2lXIlmJ+L70VE DxWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sv0tQEov; 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 19-20020a631853000000b003ab01be4e34si17460220pgy.678.2022.06.05.21.36.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 21:36:07 -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=sv0tQEov; 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 4305569722; Sun, 5 Jun 2022 21:01:13 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245714AbiFCR7E (ORCPT + 99 others); Fri, 3 Jun 2022 13:59:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345322AbiFCRtU (ORCPT ); Fri, 3 Jun 2022 13:49:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A9205536F; Fri, 3 Jun 2022 10:45:48 -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 A598460C4E; Fri, 3 Jun 2022 17:45:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC186C3411E; Fri, 3 Jun 2022 17:45:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654278347; bh=yq3kpL5uLmlVYSLy8oKazIs+8ak4Uz688yskPdhZX6I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sv0tQEovZmz+rTRhPMtAliTWRX6c8R92DPzdqLQ0VYyAY9s2FaIx/8L7RBEFci72a ZZ2gxLE1EczxHocd5yfq9eOalsRwITGRE7UCDkUOsD0ftPLJqyD/TG5GI8Ndw+5Zmu szb4Zhifi4IdX/watS6Hq8d3kqSe4kbQ1V9Zv8IE= 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.4 13/34] net: ftgmac100: Disable hardware checksum on AST2600 Date: Fri, 3 Jun 2022 19:43:09 +0200 Message-Id: <20220603173816.381964580@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220603173815.990072516@linuxfoundation.org> References: <20220603173815.990072516@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 2c06cdcd3e75..d7478d332820 100644 --- a/drivers/net/ethernet/faraday/ftgmac100.c +++ b/drivers/net/ethernet/faraday/ftgmac100.c @@ -1880,6 +1880,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