Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4409317pxu; Mon, 21 Dec 2020 11:42:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJy8ZQyVKlgVQ+Mh+anR4H+2KY0p35QubET0UnqGLYnsaP4Mz6rvzTbI65wGNct/tJJSIkK2 X-Received: by 2002:a17:907:118e:: with SMTP id uz14mr15554799ejb.83.1608579737530; Mon, 21 Dec 2020 11:42:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608579737; cv=none; d=google.com; s=arc-20160816; b=eUQGugnqOwUvAUC9ZvYKqjZ59U3P1pE9IxDjC01FjIiQPbRLbOj7t9hky0DkfyGXQC HNC9b8MveptVYRo8b7jVKdlTGM1drBUD2EW58XuIeaKCdmRtQOUYkyfLJGc4J0t92mau LqYfLZ4FqW74s3s3Gau+6tBoGesayRXyULv21abTPwlqoie2c71A72Z2RbiMNhgZfJC8 oyWHgZOAXCU/ReGwUiGT9DuGca5S7l5SQE3qt4Jq7v9WHfpJUAcOSdULV1NVhKN9/PCy Xrt6q+YYIHMTATdo0sPfGM/hkmAbqkkVqP+H51D/jGVhcgZITjadui6cu9Zjf9L657lx nghA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=VomSjNjos3Dgz1Ad3/LjWjtCRs2lnN+G8Kb+UxP6mD0=; b=Ji+WHNPeZRe/VLTwDJkKZYZJKjWZVGozcNru996OiGfwa/Mv74e+vB7I2KfRoMCN0t TmrhfctuL6HMf2AJrer3xiAmbyqpHaOKOYxO2zigHVNIlci/wnsc68qUX6n5ogY8ezCQ g4wVLEQcid3XFSy2Te16UYJPsIM9YHDZsUpzWzbsEef8Ax3TvTG0bftZSv/ez8rzZk9S /ltCP0pKfP8945EYSZ7kzWBTBGUeyILdfJI3w3YDsfFQy4Eqk5TRSX/EI3Wl8KsohhB0 YqfHojZ9RkwbqZ1V2D9uYqXCj1ClHCydz413JClWZjj2wIF3Nvw1zuaPH9vIguES1lm4 gWvQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dq8si9503476ejc.750.2020.12.21.11.41.54; Mon, 21 Dec 2020 11:42:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727152AbgLUTlZ (ORCPT + 99 others); Mon, 21 Dec 2020 14:41:25 -0500 Received: from atlmailgw2.ami.com ([63.147.10.42]:44677 "EHLO atlmailgw2.ami.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726518AbgLUTlZ (ORCPT ); Mon, 21 Dec 2020 14:41:25 -0500 X-AuditID: ac10606f-231ff70000001934-53-5fe0fa3b97ea Received: from atlms1.us.megatrends.com (atlms1.us.megatrends.com [172.16.96.144]) (using TLS with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client did not present a certificate) by atlmailgw2.ami.com (Symantec Messaging Gateway) with SMTP id AE.EF.06452.B3AF0EF5; Mon, 21 Dec 2020 14:40:44 -0500 (EST) Received: from ami-us-wk.us.megatrends.com (172.16.98.207) by atlms1.us.megatrends.com (172.16.96.144) with Microsoft SMTP Server (TLS) id 14.3.468.0; Mon, 21 Dec 2020 14:40:43 -0500 From: Hongwei Zhang To: , , , Jakub Kicinski , David S Miller CC: Hongwei Zhang , netdev , Joel Stanley , Andrew Jeffery Subject: [Aspeed,ncsi-rx, v2 1/1] net: ftgmac100: Fix AST2600 EVB NCSI RX issue Date: Mon, 21 Dec 2020 14:40:26 -0500 Message-ID: <20201221194026.30715-2-hongweiz@ami.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201215192323.24359-1-hongweiz@ami.com> References: <20201215192323.24359-1-hongweiz@ami.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.16.98.207] X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrOLMWRmVeSWpSXmKPExsWyRiBhgq7NrwfxBr/Ps1nsusxhMed8C4vF 7/N/mS0ubOtjtWhefY7Z4vKuOWwWxxaIWZxqecHiwOFxtX0Xu8eWlTeZPC5+PMbssWlVJ5vH +RkLGT0+b5ILYIvisklJzcksSy3St0vgypg/W6egT6Biz/rdjA2MJ3m7GDk5JARMJI4daWfu YuTiEBLYxSRx4vUhViiHUeLzuQ0sIFVsAmoSezfPYQJJiAisZpTo2fCLEcRhFuhglJj64is7 SJWwgL/Euu+TwDpYBFQl9u68wgRi8wqYSrxZ/JYJYp+8xOoNB4D2cXBwCphJ7DklBxIWAipp 3fcOqlxQ4uTMJ2BjmAUkJA6+eMEMUSMrcevQY6gxihIPfn1nncAoMAtJyywkLQsYmVYxCiWW 5OQmZuaklxvpJeZm6iXn525ihAR2/g7Gjx/NDzEycTAeYpTgYFYS4TWTuh8vxJuSWFmVWpQf X1Sak1p8iFGag0VJnHeV+9F4IYH0xJLU7NTUgtQimCwTB6dUA+NE76s2TWf3rrr3ffO8TQqz P5T9F03U9kphXT5PiOWt55ZndsnvNj1V/5EszP1tlq/ul+l3D5c/7PwaaREgOV056si5vzv1 DtZLdRj5fD65480HJrP64j/PrJm3ZNfv+fEuvaB6vdnzhpQFntObtsrn7HfIO7ZfaO5jDZ8N YY7RjBpCM+5sSexXYinOSDTUYi4qTgQAMXQx8FoCAAA= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When FTGMAC100 driver is used on other NCSI Ethernet controllers, few controllers have compatible issue, removing FTGMAC100_RXDES0_RX_ERR bit from RXDES0_ANY_ERROR can fix the issue. Fixes: 7ee2d5b4d4340353 ("ARM: dts: nuvoton: Add Fii Kudo system") Signed-off-by: Hongwei Zhang --- drivers/net/ethernet/faraday/Kconfig | 9 +++++++++ drivers/net/ethernet/faraday/ftgmac100.h | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/drivers/net/ethernet/faraday/Kconfig b/drivers/net/ethernet/faraday/Kconfig index c2677ec0564d..ccd0c30be0db 100644 --- a/drivers/net/ethernet/faraday/Kconfig +++ b/drivers/net/ethernet/faraday/Kconfig @@ -38,4 +38,13 @@ config FTGMAC100 from Faraday. It is used on Faraday A369, Andes AG102 and some other ARM/NDS32 SoC's. +config FTGMAC100_RXDES0_RX_ERR_CHK + bool "Include FTGMAC100_RXDES0_RX_ERR in RXDES0_ANY_ERROR" + default y + depends on FTGMAC100 + help + Say N here if the NCSI controller on your platform has compatible + issue with FTGMAC100, thus always trigger RXDES0_RX_ERR. Exclude + this bit can fix the issue. + endif # NET_VENDOR_FARADAY diff --git a/drivers/net/ethernet/faraday/ftgmac100.h b/drivers/net/ethernet/faraday/ftgmac100.h index 63b3e02fab16..59e1bd52d261 100644 --- a/drivers/net/ethernet/faraday/ftgmac100.h +++ b/drivers/net/ethernet/faraday/ftgmac100.h @@ -251,12 +251,20 @@ struct ftgmac100_rxdes { #define FTGMAC100_RXDES0_RXPKT_RDY (1 << 31) /* Errors we care about for dropping packets */ +#ifdef CONFIG_FTGMAC100_RXDES0_RX_ERR_CHK #define RXDES0_ANY_ERROR ( \ FTGMAC100_RXDES0_RX_ERR | \ FTGMAC100_RXDES0_CRC_ERR | \ FTGMAC100_RXDES0_FTL | \ FTGMAC100_RXDES0_RUNT | \ FTGMAC100_RXDES0_RX_ODD_NB) +#else +#define RXDES0_ANY_ERROR ( \ + FTGMAC100_RXDES0_CRC_ERR | \ + FTGMAC100_RXDES0_FTL | \ + FTGMAC100_RXDES0_RUNT | \ + FTGMAC100_RXDES0_RX_ODD_NB) +#endif #define FTGMAC100_RXDES1_VLANTAG_CI 0xffff #define FTGMAC100_RXDES1_PROT_MASK (0x3 << 20) -- 2.17.1