From: Hongwei Zhang <hongweiz@ami.com>
To: <linux-aspeed@lists.ozlabs.org>, <linux-kernel@vger.kernel.org>,
<openbmc@lists.ozlabs.org>, Jakub Kicinski <kuba@kernel.org>,
David S Miller <davem@davemloft.net>
Cc: Hongwei Zhang <hongweiz@ami.com>, netdev <netdev@vger.kernel.org>,
Joel Stanley <joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>
Subject: [Aspeed,ncsi-rx, v1 1/1] net: ftgmac100: Fix AST2600 EVB NCSI RX issue
Date: Mon, 21 Dec 2020 12:00:46 -0500 [thread overview]
Message-ID: <20201221170048.29821-2-hongweiz@ami.com> (raw)
In-Reply-To: <20201215192323.24359-1-hongweiz@ami.com>
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 <hongweiz@ami.com>
---
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
next prev parent reply other threads:[~2020-12-21 17:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20201215192323.24359-1-hongweiz@ami.com>
2020-12-21 17:00 ` [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB NCSI RX issue Hongwei Zhang
2020-12-22 2:26 ` Joel Stanley
2020-12-22 2:43 ` [Aspeed, ncsi-rx, " Dylan Hung
2020-12-21 17:00 ` Hongwei Zhang [this message]
2020-12-21 17:00 ` [Aspeed,ncsi-rx, " Hongwei Zhang
2020-12-21 17:00 ` [Aspeed,ncsi-rx, v1] Answer to initial submission Hongwei Zhang
2020-12-21 19:40 ` [Aspeed,ncsi-rx, v2 0/1] net: ftgmac100: Fix AST2600EVB NCSI RX issue Hongwei Zhang
2020-12-21 19:40 ` [Aspeed,ncsi-rx, v2 1/1] net: ftgmac100: Fix AST2600 EVB " Hongwei Zhang
2020-12-21 22:09 ` Jakub Kicinski
2021-01-11 20:58 ` [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB " Hongwei Zhang
2021-01-11 20:59 ` [Aspeed,ncsi-rx, v2 1/1] " Hongwei Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201221170048.29821-2-hongweiz@ami.com \
--to=hongweiz@ami.com \
--cc=andrew@aj.id.au \
--cc=davem@davemloft.net \
--cc=joel@jms.id.au \
--cc=kuba@kernel.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=openbmc@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).