linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB NCSI RX issue
@ 2020-12-15 19:23 Hongwei Zhang
  2020-12-15 19:23 ` [Aspeed,ncsi-rx, v1 1/1] net: ftgmac100: Fix AST2600 EVB " Hongwei Zhang
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Hongwei Zhang @ 2020-12-15 19:23 UTC (permalink / raw)
  To: linux-aspeed, linux-kernel, openbmc, Jakub Kicinski, David S Miller
  Cc: Hongwei Zhang, Joel Stanley, Andrew Jeffery

Dear Reviewer,

Fix AST2600 EVB NCSI RX timeout issue by removing FTGMAC100_RXDES0_RX_ERR bit 
from macro RXDES0_ANY_ERROR.

Hongwei Zhang (1):
  net: ftgmac100: Fix AST2600 EVB NCSI RX issue

 drivers/net/ethernet/faraday/ftgmac100.h | 1 -
 1 file changed, 1 deletion(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Aspeed,ncsi-rx, v1 1/1] net: ftgmac100: Fix AST2600 EVB NCSI RX issue
  2020-12-15 19:23 [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB NCSI RX issue Hongwei Zhang
@ 2020-12-15 19:23 ` Hongwei Zhang
  2020-12-15 20:31   ` Jakub Kicinski
  2020-12-15 22:47   ` Andrew Jeffery
  2020-12-21 17:00 ` [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB " Hongwei Zhang
                   ` (7 subsequent siblings)
  8 siblings, 2 replies; 15+ messages in thread
From: Hongwei Zhang @ 2020-12-15 19:23 UTC (permalink / raw)
  To: linux-aspeed, linux-kernel, openbmc, Jakub Kicinski, David S Miller
  Cc: Hongwei Zhang, Joel Stanley, Andrew Jeffery

Fix AST2600 EVB NCSI RX timeout issue by removing FTGMAC100_RXDES0_RX_ERR bit
from macro RXDES0_ANY_ERROR.

Signed-off-by: Hongwei Zhang <hongweiz@ami.com>
---
 drivers/net/ethernet/faraday/ftgmac100.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/faraday/ftgmac100.h b/drivers/net/ethernet/faraday/ftgmac100.h
index 63b3e02fab16..734477e6f72f 100644
--- a/drivers/net/ethernet/faraday/ftgmac100.h
+++ b/drivers/net/ethernet/faraday/ftgmac100.h
@@ -252,7 +252,6 @@ struct ftgmac100_rxdes {
 
 /* Errors we care about for dropping packets */
 #define RXDES0_ANY_ERROR		( \
-	FTGMAC100_RXDES0_RX_ERR		| \
 	FTGMAC100_RXDES0_CRC_ERR	| \
 	FTGMAC100_RXDES0_FTL		| \
 	FTGMAC100_RXDES0_RUNT		| \
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [Aspeed,ncsi-rx, v1 1/1] net: ftgmac100: Fix AST2600 EVB NCSI RX issue
  2020-12-15 19:23 ` [Aspeed,ncsi-rx, v1 1/1] net: ftgmac100: Fix AST2600 EVB " Hongwei Zhang
@ 2020-12-15 20:31   ` Jakub Kicinski
  2020-12-15 22:47   ` Andrew Jeffery
  1 sibling, 0 replies; 15+ messages in thread
From: Jakub Kicinski @ 2020-12-15 20:31 UTC (permalink / raw)
  To: Hongwei Zhang
  Cc: linux-aspeed, linux-kernel, openbmc, David S Miller,
	Joel Stanley, Andrew Jeffery

On Tue, 15 Dec 2020 14:23:23 -0500 Hongwei Zhang wrote:
> Fix AST2600 EVB NCSI RX timeout issue by removing FTGMAC100_RXDES0_RX_ERR bit
> from macro RXDES0_ANY_ERROR.
> 
> Signed-off-by: Hongwei Zhang <hongweiz@ami.com>

Thanks for the patch. Please repost CCing the netdev mailing list so it
can be merged to the networking tree (which I assume is your intent).
Please also include a Fixes tag pointing to the commit where the
timeout issue started (even if it's the first commit of the driver).

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Aspeed,ncsi-rx, v1 1/1] net: ftgmac100: Fix AST2600 EVB NCSI RX issue
  2020-12-15 19:23 ` [Aspeed,ncsi-rx, v1 1/1] net: ftgmac100: Fix AST2600 EVB " Hongwei Zhang
  2020-12-15 20:31   ` Jakub Kicinski
@ 2020-12-15 22:47   ` Andrew Jeffery
  1 sibling, 0 replies; 15+ messages in thread
From: Andrew Jeffery @ 2020-12-15 22:47 UTC (permalink / raw)
  To: Hongwei Zhang, linux-aspeed, linux-kernel, openbmc,
	Jakub Kicinski, David Miller
  Cc: Joel Stanley



On Wed, 16 Dec 2020, at 05:53, Hongwei Zhang wrote:
> Fix AST2600 EVB NCSI RX timeout issue by removing FTGMAC100_RXDES0_RX_ERR bit
> from macro RXDES0_ANY_ERROR.

But why? What is wrong with the EVB that this change resolves? Which revision 
of the EVB?

The change affects all designs using the MAC, not just the AST2600 EVB. Why is 
this patch an appropriate course of action? Can we not add a quirk targeting the
specific board (e.g. a devicetree property)?

Andrew

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB NCSI RX issue
  2020-12-15 19:23 [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB NCSI RX issue Hongwei Zhang
  2020-12-15 19:23 ` [Aspeed,ncsi-rx, v1 1/1] net: ftgmac100: Fix AST2600 EVB " Hongwei Zhang
@ 2020-12-21 17:00 ` Hongwei Zhang
  2020-12-22  2:26   ` Joel Stanley
  2020-12-21 17:00 ` [Aspeed,ncsi-rx, v1 1/1] net: ftgmac100: Fix AST2600 EVB " Hongwei Zhang
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: Hongwei Zhang @ 2020-12-21 17:00 UTC (permalink / raw)
  To: linux-aspeed, linux-kernel, openbmc, Jakub Kicinski, David S Miller
  Cc: Hongwei Zhang, netdev, Joel Stanley, Andrew Jeffery

Dear Reviewer,

When FTGMAC100 driver is used on other NCSI Ethernet controllers, few
controllers have compatible issue. One example is Intel I210 Ethernet
controller on AST2600 BMC, with FTGMAC100 driver, it always trigger
RXDES0_RX_ERR error, cause NCSI initialization failure, removing
FTGMAC100_RXDES0_RX_ERR bit from RXDES0_ANY_ERROR fix the issue.

Here are part of the debug logs:
......
[   35.075552] ftgmac100_hard_start_xmit TXDESO=b000003c
[   35.080843] ftgmac100 1e660000.ethernet eth0: tx_complete_packet 55
[   35.087141] ftgmac100 1e660000.ethernet eth0: rx_packet_error RXDES0=0xb0070040
[   35.094448] ftgmac100_rx_packet RXDES0=b0070040 RXDES1=f0800000 RXDES2=88f8 
[   35.101498] ftgmac100 1e660000.ethernet eth0: rx_packet_error 0xb0070040
[   35.108205] ftgmac100 1e660000.ethernet eth0: [ISR] = 0xb0070040: RX_ERR
[   35.287808] i2c i2c-1: new_device: Instantiated device slave-mqueue at 0x12
[   35.428379] ftgmac100_hard_start_xmit TXDESO=b000003c
[   35.433624] ftgmac100 1e660000.ethernet eth0: tx_complete_packet 56
[   35.439915] ftgmac100 1e660000.ethernet eth0: rx_packet_error RXDES0=0xb0070040
[   35.447225] ftgmac100_rx_packet RXDES0=b0070040 RXDES1=f0800000 RXDES2=88f8
[   35.454273] ftgmac100 1e660000.ethernet eth0: rx_packet_error 0xb0070040
[   35.460972] ftgmac100 1e660000.ethernet eth0: [ISR] = 0xb0070040: RX_ERR
[   35.797825] ftgmac100_hard_start_xmit TXDESO=b000003c
[   35.803241] ftgmac100 1e660000.ethernet eth0: tx_complete_packet 57
[   35.809541] ftgmac100 1e660000.ethernet eth0: rx_packet_error RXDES0=0xb0070040
[   35.816848] ftgmac100_rx_packet RXDES0=b0070040 RXDES1=f0800000 RXDES2=88f8
[   35.823899] ftgmac100 1e660000.ethernet eth0: rx_packet_error 0xb0070040
[   35.830597] ftgmac100 1e660000.ethernet eth0: [ISR] = 0xb0070040: RX_ERR
[   36.179914] ftgmac100_hard_start_xmit TXDESO=b000003c
[   36.185160] ftgmac100 1e660000.ethernet eth0: tx_complete_packet 58
[   36.191454] ftgmac100 1e660000.ethernet eth0: rx_packet_error RXDES0=0xb0070040
[   36.198761] ftgmac100_rx_packet RXDES0=b0070040 RXDES1=f0800000 RXDES2=88f8
[   36.205813] ftgmac100 1e660000.ethernet eth0: rx_packet_error 0xb0070040
[   36.212513] ftgmac100 1e660000.ethernet eth0: [ISR] = 0xb0070040: RX_ERR
[   36.593688] ftgmac100_hard_start_xmit TXDESO=b000003c
[   36.602937] ftgmac100 1e660000.ethernet eth0: tx_complete_packet 59
[   36.609244] ftgmac100 1e660000.ethernet eth0: rx_packet_error RXDES0=0xb0070040
[   36.616558] ftgmac100_rx_packet RXDES0=b0070040 RXDES1=f0800000 RXDES2=88f8
[   36.623608] ftgmac100 1e660000.ethernet eth0: rx_packet_error 0xb0070040
[   36.630315] ftgmac100 1e660000.ethernet eth0: [ISR] = 0xb0070040: RX_ERR
[   37.031524] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   37.067831] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
............

This patch add a configurable flag, FTGMAC100_RXDES0_RX_ERR_CHK, in FTGMAC100
 driver, it is YES by default, so keep the orignal define of
RXDES0_ANY_ERROR. If it is needed, user can set the flag to NO to remove
the RXDES0_RX_ERR bit, to fix the issue.

Hongwei Zhang (1):
  net: ftgmac100: Fix AST2600 EVB NCSI RX issue

 drivers/net/ethernet/faraday/Kconfig     | 9 +++++++++
 drivers/net/ethernet/faraday/ftgmac100.h | 8 ++++++++
 2 files changed, 17 insertions(+)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Aspeed,ncsi-rx, v1 1/1] net: ftgmac100: Fix AST2600 EVB NCSI RX issue
  2020-12-15 19:23 [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB NCSI RX issue Hongwei Zhang
  2020-12-15 19:23 ` [Aspeed,ncsi-rx, v1 1/1] net: ftgmac100: Fix AST2600 EVB " Hongwei Zhang
  2020-12-21 17:00 ` [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB " Hongwei Zhang
@ 2020-12-21 17:00 ` Hongwei Zhang
  2020-12-21 17:00 ` [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB " Hongwei Zhang
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Hongwei Zhang @ 2020-12-21 17:00 UTC (permalink / raw)
  To: linux-aspeed, linux-kernel, openbmc, Jakub Kicinski, David S Miller
  Cc: Hongwei Zhang, netdev, Joel Stanley, Andrew Jeffery

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


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB NCSI RX issue
  2020-12-15 19:23 [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB NCSI RX issue Hongwei Zhang
                   ` (2 preceding siblings ...)
  2020-12-21 17:00 ` [Aspeed,ncsi-rx, v1 1/1] net: ftgmac100: Fix AST2600 EVB " Hongwei Zhang
@ 2020-12-21 17:00 ` Hongwei Zhang
  2020-12-21 17:00 ` [Aspeed,ncsi-rx, v1] Answer to initial submission Hongwei Zhang
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Hongwei Zhang @ 2020-12-21 17:00 UTC (permalink / raw)
  To: linux-aspeed, linux-kernel, openbmc, Jakub Kicinski, David S Miller
  Cc: Hongwei Zhang, netdev, Joel Stanley, Andrew Jeffery

Hi Andrew,

> From:	Andrew Jeffery <andrew@aj.id.au>
> 
> > Fix AST2600 EVB NCSI RX timeout issue by removing 
> > FTGMAC100_RXDES0_RX_ERR bit from macro RXDES0_ANY_ERROR.
> 
> But why? What is wrong with the EVB that this change resolves? Which revision of the EVB?
> 
> The change affects all designs using the MAC, not just the AST2600 EVB. Why is this patch an 
> appropriate course of action? Can we not add a quirk targeting the specific board (e.g. a devicetree 
> property)?

You are correct. I was in a rush and didn't put this patch under whole picture 
of the driver it affected. I revised the cover letter with more information, also
use a configurable flag to isolate the change. please review the new approach.

> 
> Andrew
> 
Thanks,
--Hongwei


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Aspeed,ncsi-rx, v1] Answer to initial submission
  2020-12-15 19:23 [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB NCSI RX issue Hongwei Zhang
                   ` (3 preceding siblings ...)
  2020-12-21 17:00 ` [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB " Hongwei Zhang
@ 2020-12-21 17:00 ` Hongwei Zhang
  2020-12-21 19:40 ` [Aspeed,ncsi-rx, v2 0/1] net: ftgmac100: Fix AST2600EVB NCSI RX issue Hongwei Zhang
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Hongwei Zhang @ 2020-12-21 17:00 UTC (permalink / raw)
  To: linux-aspeed, linux-kernel, openbmc, Jakub Kicinski, David S Miller
  Cc: Hongwei Zhang, netdev, Joel Stanley, Andrew Jeffery

Hi Jakub,

> From:	Jakub Kicinski <kuba@kernel.org>
> 
> > ... 
> > Signed-off-by: Hongwei Zhang <hongweiz@ami.com>
> 
> Thanks for the patch. Please repost CCing the netdev mailing list so it can be merged to the networking 
> tree (which I assume is your intent).
> Please also include a Fixes tag pointing to the commit where the timeout issue started (even if it's the 
> first commit of the driver).
> 
I updated the cc list and cover letter accordingly, also addressed
Andrew's question. please review.

Thanks,
--Hongwei

-- 
2.17.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Aspeed,ncsi-rx, v2 0/1] net: ftgmac100: Fix AST2600EVB NCSI RX issue
  2020-12-15 19:23 [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB NCSI RX issue Hongwei Zhang
                   ` (4 preceding siblings ...)
  2020-12-21 17:00 ` [Aspeed,ncsi-rx, v1] Answer to initial submission Hongwei Zhang
@ 2020-12-21 19:40 ` Hongwei Zhang
  2020-12-21 19:40 ` [Aspeed,ncsi-rx, v2 1/1] net: ftgmac100: Fix AST2600 EVB " Hongwei Zhang
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Hongwei Zhang @ 2020-12-21 19:40 UTC (permalink / raw)
  To: linux-aspeed, linux-kernel, openbmc, Jakub Kicinski, David S Miller
  Cc: Hongwei Zhang, netdev, Joel Stanley, Andrew Jeffery

Dear Reviewer,

When FTGMAC100 driver is used on other NCSI Ethernet controllers, few
controllers have compatible issue. One example is Intel I210 Ethernet
controller on AST2600 BMC, with FTGMAC100 driver, it always trigger
RXDES0_RX_ERR error, cause NCSI initialization failure, removing
FTGMAC100_RXDES0_RX_ERR bit from RXDES0_ANY_ERROR fix the issue.

Here are part of the debug logs:
......
[   35.075552] ftgmac100_hard_start_xmit TXDESO=b000003c
[   35.080843] ftgmac100 1e660000.ethernet eth0: tx_complete_packet 55
[   35.087141] ftgmac100 1e660000.ethernet eth0: rx_packet_error RXDES0=0xb0070040
[   35.094448] ftgmac100_rx_packet RXDES0=b0070040 RXDES1=f0800000 RXDES2=88f8 
[   35.101498] ftgmac100 1e660000.ethernet eth0: rx_packet_error 0xb0070040
[   35.108205] ftgmac100 1e660000.ethernet eth0: [ISR] = 0xb0070040: RX_ERR
[   35.287808] i2c i2c-1: new_device: Instantiated device slave-mqueue at 0x12
[   35.428379] ftgmac100_hard_start_xmit TXDESO=b000003c
[   35.433624] ftgmac100 1e660000.ethernet eth0: tx_complete_packet 56
[   35.439915] ftgmac100 1e660000.ethernet eth0: rx_packet_error RXDES0=0xb0070040
[   35.447225] ftgmac100_rx_packet RXDES0=b0070040 RXDES1=f0800000 RXDES2=88f8
[   35.454273] ftgmac100 1e660000.ethernet eth0: rx_packet_error 0xb0070040
[   35.460972] ftgmac100 1e660000.ethernet eth0: [ISR] = 0xb0070040: RX_ERR
[   35.797825] ftgmac100_hard_start_xmit TXDESO=b000003c
[   35.803241] ftgmac100 1e660000.ethernet eth0: tx_complete_packet 57
[   35.809541] ftgmac100 1e660000.ethernet eth0: rx_packet_error RXDES0=0xb0070040
[   35.816848] ftgmac100_rx_packet RXDES0=b0070040 RXDES1=f0800000 RXDES2=88f8
[   35.823899] ftgmac100 1e660000.ethernet eth0: rx_packet_error 0xb0070040
[   35.830597] ftgmac100 1e660000.ethernet eth0: [ISR] = 0xb0070040: RX_ERR
[   36.179914] ftgmac100_hard_start_xmit TXDESO=b000003c
[   36.185160] ftgmac100 1e660000.ethernet eth0: tx_complete_packet 58
[   36.191454] ftgmac100 1e660000.ethernet eth0: rx_packet_error RXDES0=0xb0070040
[   36.198761] ftgmac100_rx_packet RXDES0=b0070040 RXDES1=f0800000 RXDES2=88f8
[   36.205813] ftgmac100 1e660000.ethernet eth0: rx_packet_error 0xb0070040
[   36.212513] ftgmac100 1e660000.ethernet eth0: [ISR] = 0xb0070040: RX_ERR
[   36.593688] ftgmac100_hard_start_xmit TXDESO=b000003c
[   36.602937] ftgmac100 1e660000.ethernet eth0: tx_complete_packet 59
[   36.609244] ftgmac100 1e660000.ethernet eth0: rx_packet_error RXDES0=0xb0070040
[   36.616558] ftgmac100_rx_packet RXDES0=b0070040 RXDES1=f0800000 RXDES2=88f8
[   36.623608] ftgmac100 1e660000.ethernet eth0: rx_packet_error 0xb0070040
[   36.630315] ftgmac100 1e660000.ethernet eth0: [ISR] = 0xb0070040: RX_ERR
[   37.031524] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   37.067831] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
............

This patch add a configurable flag, FTGMAC100_RXDES0_RX_ERR_CHK, in FTGMAC100
 driver, it is YES by default, so keep the orignal define of
RXDES0_ANY_ERROR. If it is needed, user can set the flag to NO to remove
the RXDES0_RX_ERR bit, to fix the issue.

Hongwei Zhang (1):
  net: ftgmac100: Fix AST2600 EVB NCSI RX issue

 drivers/net/ethernet/faraday/Kconfig     | 9 +++++++++
 drivers/net/ethernet/faraday/ftgmac100.h | 8 ++++++++
 2 files changed, 17 insertions(+)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Aspeed,ncsi-rx, v2 1/1] net: ftgmac100: Fix AST2600 EVB NCSI RX issue
  2020-12-15 19:23 [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB NCSI RX issue Hongwei Zhang
                   ` (5 preceding siblings ...)
  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 ` 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
  8 siblings, 1 reply; 15+ messages in thread
From: Hongwei Zhang @ 2020-12-21 19:40 UTC (permalink / raw)
  To: linux-aspeed, linux-kernel, openbmc, Jakub Kicinski, David S Miller
  Cc: Hongwei Zhang, netdev, Joel Stanley, Andrew Jeffery

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


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [Aspeed,ncsi-rx, v2 1/1] net: ftgmac100: Fix AST2600 EVB NCSI RX issue
  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
  0 siblings, 0 replies; 15+ messages in thread
From: Jakub Kicinski @ 2020-12-21 22:09 UTC (permalink / raw)
  To: Hongwei Zhang
  Cc: linux-aspeed, linux-kernel, openbmc, David S Miller, netdev,
	Joel Stanley, Andrew Jeffery

On Mon, 21 Dec 2020 14:40:26 -0500 Hongwei Zhang wrote:
> When FTGMAC100 driver is used on other NCSI Ethernet controllers, few

When you say NCSI Ethernet controller here you mean the main system
NIC, right? The MAC on the NCSI side is FTGMAC100, correct?

In that case I'm not sure how user is supposed to control this setting
at build time. The system NIC is often pluggable on the PCIe bus, and
can be changed at will.

> 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")

Please fix the commit hash, this hash does not exist upstream:

Commit: 8711d4ef64fa ("net: ftgmac100: Fix AST2600 EVB NCSI RX issue")
	Fixes tag: Fixes: 7ee2d5b4d4340353 ("ARM: dts: nuvoton: Add Fii Kudo system")
	Has these problem(s):
		- Target SHA1 does not exist

> 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)


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB NCSI RX issue
  2020-12-21 17:00 ` [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB " Hongwei Zhang
@ 2020-12-22  2:26   ` Joel Stanley
  2020-12-22  2:43     ` [Aspeed, ncsi-rx, " Dylan Hung
  0 siblings, 1 reply; 15+ messages in thread
From: Joel Stanley @ 2020-12-22  2:26 UTC (permalink / raw)
  To: Hongwei Zhang, Ryan Chen
  Cc: linux-aspeed, Linux Kernel Mailing List, OpenBMC Maillist,
	Jakub Kicinski, David S Miller, netdev, Andrew Jeffery

On Mon, 21 Dec 2020 at 17:01, Hongwei Zhang <hongweiz@ami.com> wrote:
>
> Dear Reviewer,
>
> When FTGMAC100 driver is used on other NCSI Ethernet controllers, few
> controllers have compatible issue. One example is Intel I210 Ethernet
> controller on AST2600 BMC, with FTGMAC100 driver, it always trigger
> RXDES0_RX_ERR error, cause NCSI initialization failure, removing
> FTGMAC100_RXDES0_RX_ERR bit from RXDES0_ANY_ERROR fix the issue.

I work with a few systems that use the i210 on the 2600. We haven't
seen this issue in our testing.

Is there something specific about the setup that you use to trigger this?

Ryan, is this an issue that Aspeed is aware of?

Cheers,

Joel

>
> Here are part of the debug logs:
> ......
> [   35.075552] ftgmac100_hard_start_xmit TXDESO=b000003c
> [   35.080843] ftgmac100 1e660000.ethernet eth0: tx_complete_packet 55
> [   35.087141] ftgmac100 1e660000.ethernet eth0: rx_packet_error RXDES0=0xb0070040
> [   35.094448] ftgmac100_rx_packet RXDES0=b0070040 RXDES1=f0800000 RXDES2=88f8
> [   35.101498] ftgmac100 1e660000.ethernet eth0: rx_packet_error 0xb0070040
> [   35.108205] ftgmac100 1e660000.ethernet eth0: [ISR] = 0xb0070040: RX_ERR
> [   35.287808] i2c i2c-1: new_device: Instantiated device slave-mqueue at 0x12
> [   35.428379] ftgmac100_hard_start_xmit TXDESO=b000003c
> [   35.433624] ftgmac100 1e660000.ethernet eth0: tx_complete_packet 56
> [   35.439915] ftgmac100 1e660000.ethernet eth0: rx_packet_error RXDES0=0xb0070040
> [   35.447225] ftgmac100_rx_packet RXDES0=b0070040 RXDES1=f0800000 RXDES2=88f8
> [   35.454273] ftgmac100 1e660000.ethernet eth0: rx_packet_error 0xb0070040
> [   35.460972] ftgmac100 1e660000.ethernet eth0: [ISR] = 0xb0070040: RX_ERR
> [   35.797825] ftgmac100_hard_start_xmit TXDESO=b000003c
> [   35.803241] ftgmac100 1e660000.ethernet eth0: tx_complete_packet 57
> [   35.809541] ftgmac100 1e660000.ethernet eth0: rx_packet_error RXDES0=0xb0070040
> [   35.816848] ftgmac100_rx_packet RXDES0=b0070040 RXDES1=f0800000 RXDES2=88f8
> [   35.823899] ftgmac100 1e660000.ethernet eth0: rx_packet_error 0xb0070040
> [   35.830597] ftgmac100 1e660000.ethernet eth0: [ISR] = 0xb0070040: RX_ERR
> [   36.179914] ftgmac100_hard_start_xmit TXDESO=b000003c
> [   36.185160] ftgmac100 1e660000.ethernet eth0: tx_complete_packet 58
> [   36.191454] ftgmac100 1e660000.ethernet eth0: rx_packet_error RXDES0=0xb0070040
> [   36.198761] ftgmac100_rx_packet RXDES0=b0070040 RXDES1=f0800000 RXDES2=88f8
> [   36.205813] ftgmac100 1e660000.ethernet eth0: rx_packet_error 0xb0070040
> [   36.212513] ftgmac100 1e660000.ethernet eth0: [ISR] = 0xb0070040: RX_ERR
> [   36.593688] ftgmac100_hard_start_xmit TXDESO=b000003c
> [   36.602937] ftgmac100 1e660000.ethernet eth0: tx_complete_packet 59
> [   36.609244] ftgmac100 1e660000.ethernet eth0: rx_packet_error RXDES0=0xb0070040
> [   36.616558] ftgmac100_rx_packet RXDES0=b0070040 RXDES1=f0800000 RXDES2=88f8
> [   36.623608] ftgmac100 1e660000.ethernet eth0: rx_packet_error 0xb0070040
> [   36.630315] ftgmac100 1e660000.ethernet eth0: [ISR] = 0xb0070040: RX_ERR
> [   37.031524] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
> [   37.067831] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
> ............
>
> This patch add a configurable flag, FTGMAC100_RXDES0_RX_ERR_CHK, in FTGMAC100
>  driver, it is YES by default, so keep the orignal define of
> RXDES0_ANY_ERROR. If it is needed, user can set the flag to NO to remove
> the RXDES0_RX_ERR bit, to fix the issue.
>
> Hongwei Zhang (1):
>   net: ftgmac100: Fix AST2600 EVB NCSI RX issue
>
>  drivers/net/ethernet/faraday/Kconfig     | 9 +++++++++
>  drivers/net/ethernet/faraday/ftgmac100.h | 8 ++++++++
>  2 files changed, 17 insertions(+)
>
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [Aspeed, ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB NCSI RX issue
  2020-12-22  2:26   ` Joel Stanley
@ 2020-12-22  2:43     ` Dylan Hung
  0 siblings, 0 replies; 15+ messages in thread
From: Dylan Hung @ 2020-12-22  2:43 UTC (permalink / raw)
  To: Joel Stanley, Hongwei Zhang, Ryan Chen
  Cc: linux-aspeed, netdev, OpenBMC Maillist,
	Linux Kernel Mailing List, Jakub Kicinski, David S Miller

Hi Hongwei,

The NCSI should run on 3.3V RMII.  According your log, you enabled NCSI on ftgmac100@1e660000 which can only support 1.8V I/O voltage.
Did you observe the same error on ftgmac100@1e670000 (MAC3) or ftgmac100@1e690000 (MAC4)?

--
Dylan

> -----Original Message-----
> From: Linux-aspeed
> [mailto:linux-aspeed-bounces+dylan_hung=aspeedtech.com@lists.ozlabs.org]
> On Behalf Of Joel Stanley
> Sent: 2020年12月22日 10:26 AM
> To: Hongwei Zhang <hongweiz@ami.com>; Ryan Chen
> <ryan_chen@aspeedtech.com>
> Cc: linux-aspeed <linux-aspeed@lists.ozlabs.org>; netdev
> <netdev@vger.kernel.org>; OpenBMC Maillist <openbmc@lists.ozlabs.org>;
> Linux Kernel Mailing List <linux-kernel@vger.kernel.org>; Jakub Kicinski
> <kuba@kernel.org>; David S Miller <davem@davemloft.net>
> Subject: Re: [Aspeed, ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB NCSI RX
> issue
> 
> On Mon, 21 Dec 2020 at 17:01, Hongwei Zhang <hongweiz@ami.com> wrote:
> >
> > Dear Reviewer,
> >
> > When FTGMAC100 driver is used on other NCSI Ethernet controllers, few
> > controllers have compatible issue. One example is Intel I210 Ethernet
> > controller on AST2600 BMC, with FTGMAC100 driver, it always trigger
> > RXDES0_RX_ERR error, cause NCSI initialization failure, removing
> > FTGMAC100_RXDES0_RX_ERR bit from RXDES0_ANY_ERROR fix the issue.
> 
> I work with a few systems that use the i210 on the 2600. We haven't seen this
> issue in our testing.
> 
> Is there something specific about the setup that you use to trigger this?
> 
> Ryan, is this an issue that Aspeed is aware of?
> 
> Cheers,
> 
> Joel
> 
> >
> > Here are part of the debug logs:
> > ......
> > [   35.075552] ftgmac100_hard_start_xmit TXDESO=b000003c
> > [   35.080843] ftgmac100 1e660000.ethernet eth0: tx_complete_packet 55
> > [   35.087141] ftgmac100 1e660000.ethernet eth0: rx_packet_error
> RXDES0=0xb0070040
> > [   35.094448] ftgmac100_rx_packet RXDES0=b0070040 RXDES1=f0800000
> RXDES2=88f8
> > [   35.101498] ftgmac100 1e660000.ethernet eth0: rx_packet_error
> 0xb0070040
> > [   35.108205] ftgmac100 1e660000.ethernet eth0: [ISR] = 0xb0070040:
> RX_ERR
> > [   35.287808] i2c i2c-1: new_device: Instantiated device slave-mqueue at
> 0x12
> > [   35.428379] ftgmac100_hard_start_xmit TXDESO=b000003c
> > [   35.433624] ftgmac100 1e660000.ethernet eth0: tx_complete_packet 56
> > [   35.439915] ftgmac100 1e660000.ethernet eth0: rx_packet_error
> RXDES0=0xb0070040
> > [   35.447225] ftgmac100_rx_packet RXDES0=b0070040 RXDES1=f0800000
> RXDES2=88f8
> > [   35.454273] ftgmac100 1e660000.ethernet eth0: rx_packet_error
> 0xb0070040
> > [   35.460972] ftgmac100 1e660000.ethernet eth0: [ISR] = 0xb0070040:
> RX_ERR
> > [   35.797825] ftgmac100_hard_start_xmit TXDESO=b000003c
> > [   35.803241] ftgmac100 1e660000.ethernet eth0: tx_complete_packet 57
> > [   35.809541] ftgmac100 1e660000.ethernet eth0: rx_packet_error
> RXDES0=0xb0070040
> > [   35.816848] ftgmac100_rx_packet RXDES0=b0070040 RXDES1=f0800000
> RXDES2=88f8
> > [   35.823899] ftgmac100 1e660000.ethernet eth0: rx_packet_error
> 0xb0070040
> > [   35.830597] ftgmac100 1e660000.ethernet eth0: [ISR] = 0xb0070040:
> RX_ERR
> > [   36.179914] ftgmac100_hard_start_xmit TXDESO=b000003c
> > [   36.185160] ftgmac100 1e660000.ethernet eth0: tx_complete_packet 58
> > [   36.191454] ftgmac100 1e660000.ethernet eth0: rx_packet_error
> RXDES0=0xb0070040
> > [   36.198761] ftgmac100_rx_packet RXDES0=b0070040 RXDES1=f0800000
> RXDES2=88f8
> > [   36.205813] ftgmac100 1e660000.ethernet eth0: rx_packet_error
> 0xb0070040
> > [   36.212513] ftgmac100 1e660000.ethernet eth0: [ISR] = 0xb0070040:
> RX_ERR
> > [   36.593688] ftgmac100_hard_start_xmit TXDESO=b000003c
> > [   36.602937] ftgmac100 1e660000.ethernet eth0: tx_complete_packet 59
> > [   36.609244] ftgmac100 1e660000.ethernet eth0: rx_packet_error
> RXDES0=0xb0070040
> > [   36.616558] ftgmac100_rx_packet RXDES0=b0070040 RXDES1=f0800000
> RXDES2=88f8
> > [   36.623608] ftgmac100 1e660000.ethernet eth0: rx_packet_error
> 0xb0070040
> > [   36.630315] ftgmac100 1e660000.ethernet eth0: [ISR] = 0xb0070040:
> RX_ERR
> > [   37.031524] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
> > [   37.067831] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
> > ............
> >
> > This patch add a configurable flag, FTGMAC100_RXDES0_RX_ERR_CHK, in
> > FTGMAC100  driver, it is YES by default, so keep the orignal define of
> > RXDES0_ANY_ERROR. If it is needed, user can set the flag to NO to
> > remove the RXDES0_RX_ERR bit, to fix the issue.
> >
> > Hongwei Zhang (1):
> >   net: ftgmac100: Fix AST2600 EVB NCSI RX issue
> >
> >  drivers/net/ethernet/faraday/Kconfig     | 9 +++++++++
> >  drivers/net/ethernet/faraday/ftgmac100.h | 8 ++++++++
> >  2 files changed, 17 insertions(+)
> >
> > --
> > 2.17.1
> >

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB NCSI RX issue
  2020-12-15 19:23 [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB NCSI RX issue Hongwei Zhang
                   ` (6 preceding siblings ...)
  2020-12-21 19:40 ` [Aspeed,ncsi-rx, v2 1/1] net: ftgmac100: Fix AST2600 EVB " Hongwei Zhang
@ 2021-01-11 20:58 ` Hongwei Zhang
  2021-01-11 20:59 ` [Aspeed,ncsi-rx, v2 1/1] " Hongwei Zhang
  8 siblings, 0 replies; 15+ messages in thread
From: Hongwei Zhang @ 2021-01-11 20:58 UTC (permalink / raw)
  To: Dylan Hung, Joel Stanley, linux-aspeed, linux-kernel, openbmc,
	Jakub Kicinski, David S Miller
  Cc: Hongwei Zhang, netdev, Andrew Jeffery

> 
> Hi Hongwei,
> 
> The NCSI should run on 3.3V RMII.  According your log, you enabled NCSI on 
> ftgmac100@1e660000 which can only support 1.8V I/O voltage.
> Did you observe the same error on ftgmac100@1e670000 (MAC3) or ftgmac100@1e690000 (MAC4)?
> 

Hi Dylan,

Thanks for your review and input, you're correct, this issue is not observed on
AST2600 MAC4 (ftgmac100@1e690000).

Though this issue is caused by using NCSI incompatible MAC ftgmac100@1e660000,
we thought this patch is still having value, by providing an extra option to
user to be able to use ftgmac100@1e660000 for NCSI, and this is also true for
AST2500.

--Hongwei
 
> > -----Original Message-----
> > From: Linux-aspeed
> > [mailto:linux-aspeed-bounces+dylan_hung=aspeedtech.com@lists.ozlabs.or
> > g]
> > On Behalf Of Joel Stanley
> > Sent: 2020?12?22? 10:26 AM
> > To: Hongwei Zhang <hongweiz@ami.com>; Ryan Chen 
> > <ryan_chen@aspeedtech.com>
> > Cc: linux-aspeed <linux-aspeed@lists.ozlabs.org>; netdev 
> > <netdev@vger.kernel.org>; OpenBMC Maillist <openbmc@lists.ozlabs.org>; 
> > Linux Kernel Mailing List <linux-kernel@vger.kernel.org>; Jakub 
> > Kicinski <kuba@kernel.org>; David S Miller <davem@davemloft.net>
> > Subject: Re: [Aspeed, ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB 
> > NCSI RX issue
> > 
> > On Mon, 21 Dec 2020 at 17:01, Hongwei Zhang <hongweiz@ami.com> wrote:
> > >
> > > Dear Reviewer,
> > >
> > > When FTGMAC100 driver is used on other NCSI Ethernet controllers, 
> > > few controllers have compatible issue. One example is Intel I210 
> > > Ethernet controller on AST2600 BMC, with FTGMAC100 driver, it always 
> > > trigger RXDES0_RX_ERR error, cause NCSI initialization failure, 
> > > removing FTGMAC100_RXDES0_RX_ERR bit from RXDES0_ANY_ERROR fix the issue.
> > 
> > I work with a few systems that use the i210 on the 2600. We haven't 
> > seen this issue in our testing.
> > 
> > Is there something specific about the setup that you use to trigger this?
> > 
> > Ryan, is this an issue that Aspeed is aware of?
> > 
> > Cheers,
> > 
> > Joel

Hello Joel,

Thanks for your review, please see my response to Dylan, he pointed out
the root cause of the issue.

-- Hongwei

> > 
> > >
> > > Here are part of the debug logs:
> > > ......
> > > [   35.075552] ftgmac100_hard_start_xmit TXDESO=b000003c
> > > [   35.080843] ftgmac100 1e660000.ethernet eth0: tx_complete_packet 55
> > > [   35.087141] ftgmac100 1e660000.ethernet eth0: rx_packet_error
> > RXDES0=0xb0070040
> > > [   37.067831] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
> > > ............
> > >
> > > This patch add a configurable flag, FTGMAC100_RXDES0_RX_ERR_CHK, in
> > > FTGMAC100  driver, it is YES by default, so keep the orignal define 
> > > of RXDES0_ANY_ERROR. If it is needed, user can set the flag to NO to 
> > > remove the RXDES0_RX_ERR bit, to fix the issue.
> > >
> > > Hongwei Zhang (1):
> > >   net: ftgmac100: Fix AST2600 EVB NCSI RX issue
> > >
> > >  drivers/net/ethernet/faraday/Kconfig     | 9 +++++++++
> > >  drivers/net/ethernet/faraday/ftgmac100.h | 8 ++++++++
> > >  2 files changed, 17 insertions(+)
> > >
> > > --
> > > 2.17.1
> > >
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Aspeed,ncsi-rx, v2 1/1] net: ftgmac100: Fix AST2600EVB NCSI RX issue
  2020-12-15 19:23 [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB NCSI RX issue Hongwei Zhang
                   ` (7 preceding siblings ...)
  2021-01-11 20:58 ` [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB " Hongwei Zhang
@ 2021-01-11 20:59 ` Hongwei Zhang
  8 siblings, 0 replies; 15+ messages in thread
From: Hongwei Zhang @ 2021-01-11 20:59 UTC (permalink / raw)
  To: Jakub Kicinski, Dylan Hung, Joel Stanley, linux-aspeed,
	linux-kernel, openbmc, David S Miller
  Cc: Hongwei Zhang, netdev, Andrew Jeffery

> 
> From:	Jakub Kicinski <kuba@kernel.org>
> Sent:	Monday, December 21, 2020 5:10 PM
> To:	Hongwei Zhang
> 
> On Mon, 21 Dec 2020 14:40:26 -0500 Hongwei Zhang wrote:
> > When FTGMAC100 driver is used on other NCSI Ethernet controllers, few
> 
> When you say NCSI Ethernet controller here you mean the main system NIC, right? The MAC on the NCSI 
> side is FTGMAC100, correct?
> 

Hi Jakub,

The use case for us is the MAC is configured as NCSI, so it provides network
 access for both BMC and Host, the Ethernet controller driver is from BMC kernel
side.

please see my response to Dylan in another thread, <20201215192323.24359-1-hongweiz@ami.com>,
he points out the root cause of the issue.

> In that case I'm not sure how user is supposed to control this setting at build time. The system NIC is 
> often pluggable on the PCIe bus, and can be changed at will.
> 
> > 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")
> 
> Please fix the commit hash, this hash does not exist upstream:
> 

will do.

Thanks
--Hongwei

> Commit: 8711d4ef64fa ("net: ftgmac100: Fix AST2600 EVB NCSI RX issue")
> 	Fixes tag: Fixes: 7ee2d5b4d4340353 ("ARM: dts: nuvoton: Add Fii Kudo system")
> 	Has these problem(s):
> 		- Target SHA1 does not exist
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-01-11 21:00 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15 19:23 [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB NCSI RX issue Hongwei Zhang
2020-12-15 19:23 ` [Aspeed,ncsi-rx, v1 1/1] net: ftgmac100: Fix AST2600 EVB " Hongwei Zhang
2020-12-15 20:31   ` Jakub Kicinski
2020-12-15 22:47   ` Andrew Jeffery
2020-12-21 17:00 ` [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB " Hongwei Zhang
2020-12-22  2:26   ` Joel Stanley
2020-12-22  2:43     ` [Aspeed, ncsi-rx, " Dylan Hung
2020-12-21 17:00 ` [Aspeed,ncsi-rx, v1 1/1] net: ftgmac100: Fix AST2600 EVB " Hongwei Zhang
2020-12-21 17:00 ` [Aspeed,ncsi-rx, v1 0/1] net: ftgmac100: Fix AST2600EVB " 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

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).