Re: [PATCH] net: ftgmac100: Fix missing TX-poll issue

2020-10-26 Thread Joel Stanley
On Mon, 26 Oct 2020 at 22:22, Benjamin Herrenschmidt wrote: > > On Fri, 2020-10-23 at 13:08 +, Dylan Hung wrote: > > The issue was found on our test chip (ast2600 version A0) which is > > just for testing and won't be mass-produced. This HW bug has been > > fixed on ast2600 A1 and later

Re: [PATCH] net: ftgmac100: Fix missing TX-poll issue

2020-10-26 Thread Benjamin Herrenschmidt
On Fri, 2020-10-23 at 13:08 +, Dylan Hung wrote: > The issue was found on our test chip (ast2600 version A0) which is > just for testing and won't be mass-produced. This HW bug has been > fixed on ast2600 A1 and later versions. > > To verify the HW fix, I run overnight iperf and kvm tests on

RE: [PATCH] net: ftgmac100: Fix missing TX-poll issue

2020-10-23 Thread Dylan Hung
rnel Mailing List > ; Jakub Kicinski ; David > Miller > Subject: Re: [PATCH] net: ftgmac100: Fix missing TX-poll issue > > > > On Wed, 21 Oct 2020, at 08:40, Benjamin Herrenschmidt wrote: > > On Tue, 2020-10-20 at 21:49 +0200, Arnd Bergmann wrote: > > > On

Re: [PATCH] net: ftgmac100: Fix missing TX-poll issue

2020-10-23 Thread Arnd Bergmann
On Thu, Oct 22, 2020 at 9:41 AM Benjamin Herrenschmidt wrote: > On Wed, 2020-10-21 at 14:11 +0200, Arnd Bergmann wrote: > > > > At the moment, the only chips that need the heavy barrier are > > > omap4 and mstar_v7, and early l2 cache controllers (not the one > > > on Cortex-A7) have another

Re: [PATCH] net: ftgmac100: Fix missing TX-poll issue

2020-10-22 Thread Benjamin Herrenschmidt
On Wed, 2020-10-21 at 14:11 +0200, Arnd Bergmann wrote: > (replying to my own mail from a different address to deal with the > regular one being blacklisted somewhere, sorry for any duplicates) > > On Wed, Oct 21, 2020 at 9:16 AM Arnd Bergmann wrote: > > > > On Wed, Oct 21, 2020 at 12:10 AM

Re: [PATCH] net: ftgmac100: Fix missing TX-poll issue

2020-10-21 Thread Arnd Bergmann
(replying to my own mail from a different address to deal with the regular one being blacklisted somewhere, sorry for any duplicates) On Wed, Oct 21, 2020 at 9:16 AM Arnd Bergmann wrote: > > On Wed, Oct 21, 2020 at 12:10 AM Benjamin Herrenschmidt > wrote: > > On Tue, 2020-10-20 at 21:49 +0200,

Re: [PATCH] net: ftgmac100: Fix missing TX-poll issue

2020-10-20 Thread Andrew Jeffery
On Wed, 21 Oct 2020, at 08:40, Benjamin Herrenschmidt wrote: > On Tue, 2020-10-20 at 21:49 +0200, Arnd Bergmann wrote: > > On Tue, Oct 20, 2020 at 11:37 AM Dylan Hung > > wrote: > > > > +1 @first is system memory from dma_alloc_coherent(), right? > > > > > > > > You shouldn't have to do

Re: [PATCH] net: ftgmac100: Fix missing TX-poll issue

2020-10-20 Thread Benjamin Herrenschmidt
On Tue, 2020-10-20 at 21:49 +0200, Arnd Bergmann wrote: > On Tue, Oct 20, 2020 at 11:37 AM Dylan Hung wrote: > > > +1 @first is system memory from dma_alloc_coherent(), right? > > > > > > You shouldn't have to do this. Is coherent DMA memory broken on your > > > platform? > > > > It is about

Re: [PATCH] net: ftgmac100: Fix missing TX-poll issue

2020-10-20 Thread Benjamin Herrenschmidt
On Tue, 2020-10-20 at 13:15 +, David Laight wrote: > That rather depends where the data is 'stuck'. > > An old sparc cpu would flush the cpu store buffer before the read. > But a modern x86 cpu will satisfy the read from the store buffer > for cached data. > > If the write is 'posted' on a

Re: [PATCH] net: ftgmac100: Fix missing TX-poll issue

2020-10-20 Thread Jakub Kicinski
On Tue, 20 Oct 2020 17:15:42 +1100 Benjamin Herrenschmidt wrote: > On Mon, 2020-10-19 at 19:57 -0700, Jakub Kicinski wrote: > > > I suspect the problem is that the HW (and yes this would be a HW bug) > > > doesn't order the CPU -> memory and the CPU -> MMIO path. > > > > > > What I think happens

RE: [PATCH] net: ftgmac100: Fix missing TX-poll issue

2020-10-20 Thread David Laight
From: Dylan Hung > Sent: 20 October 2020 07:15 > > > -Original Message- > > From: Jakub Kicinski [mailto:k...@kernel.org] > > > > On Mon, 19 Oct 2020 08:57:03 + Joel Stanley wrote: > > > > diff --git a/drivers/net/ethernet/faraday/ftgmac100.c > > > >

Re: [PATCH] net: ftgmac100: Fix missing TX-poll issue

2020-10-20 Thread Benjamin Herrenschmidt
On Mon, 2020-10-19 at 19:57 -0700, Jakub Kicinski wrote: > > I suspect the problem is that the HW (and yes this would be a HW bug) > > doesn't order the CPU -> memory and the CPU -> MMIO path. > > > > What I think happens is that the store to txde0 is potentially still in > > a buffer somewhere

RE: [PATCH] net: ftgmac100: Fix missing TX-poll issue

2020-10-20 Thread Dylan Hung
Chuang ; > linux-aspeed ; OpenBMC Maillist > ; BMC-SW > Subject: Re: [PATCH] net: ftgmac100: Fix missing TX-poll issue > > On Mon, 19 Oct 2020 08:57:03 + Joel Stanley wrote: > > > diff --git a/drivers/net/ethernet/faraday/ftgmac100.c > > > b/drivers/net/ethernet/f

Re: [PATCH] net: ftgmac100: Fix missing TX-poll issue

2020-10-19 Thread Jakub Kicinski
On Tue, 20 Oct 2020 10:23:41 +1100 Benjamin Herrenschmidt wrote: > On Mon, 2020-10-19 at 12:00 -0700, Jakub Kicinski wrote: > > On Mon, 19 Oct 2020 08:57:03 + Joel Stanley wrote: > > > > diff --git a/drivers/net/ethernet/faraday/ftgmac100.c > > > > b/drivers/net/ethernet/faraday/ftgmac100.c

Re: [PATCH] net: ftgmac100: Fix missing TX-poll issue

2020-10-19 Thread Benjamin Herrenschmidt
On Mon, 2020-10-19 at 12:00 -0700, Jakub Kicinski wrote: > On Mon, 19 Oct 2020 08:57:03 + Joel Stanley wrote: > > > diff --git a/drivers/net/ethernet/faraday/ftgmac100.c > > > b/drivers/net/ethernet/faraday/ftgmac100.c > > > index 00024dd41147..9a99a87f29f3 100644 > > > ---

Re: [PATCH] net: ftgmac100: Fix missing TX-poll issue

2020-10-19 Thread Jakub Kicinski
On Mon, 19 Oct 2020 08:57:03 + Joel Stanley wrote: > > diff --git a/drivers/net/ethernet/faraday/ftgmac100.c > > b/drivers/net/ethernet/faraday/ftgmac100.c > > index 00024dd41147..9a99a87f29f3 100644 > > --- a/drivers/net/ethernet/faraday/ftgmac100.c > > +++

RE: [PATCH] net: ftgmac100: Fix missing TX-poll issue

2020-10-19 Thread Dylan Hung
Chuang ; > linux-aspeed ; OpenBMC Maillist > ; BMC-SW > Subject: Re: [PATCH] net: ftgmac100: Fix missing TX-poll issue > > On Mon, 19 Oct 2020 at 07:39, Dylan Hung > wrote: > > > > The cpu accesses the register and the memory via different bus/path on > > a

Re: [PATCH] net: ftgmac100: Fix missing TX-poll issue

2020-10-19 Thread Joel Stanley
On Mon, 19 Oct 2020 at 07:39, Dylan Hung wrote: > > The cpu accesses the register and the memory via different bus/path on > aspeed soc. So we can not guarantee that the tx-poll command Just the 2600, or other versions too? > (register access) is always behind the tx descriptor (memory). In

[PATCH] net: ftgmac100: Fix missing TX-poll issue

2020-10-19 Thread Dylan Hung
The cpu accesses the register and the memory via different bus/path on aspeed soc. So we can not guarantee that the tx-poll command (register access) is always behind the tx descriptor (memory). In other words, the HW may start working even the data is not yet ready. By adding a dummy read