From: Lars Persson <lars.persson@axis.com>
To: Sasha Levin <sashal@kernel.org>, Lars Persson <larper@axis.com>
Cc: <stable@vger.kernel.org>,
Giuseppe Cavallaro <peppe.cavallaro@st.com>,
Alexandre Torgue <alexandre.torgue@st.com>,
Jose Abreu <joabreu@synopsys.com>
Subject: Re: [PATCH stable 4.9] net: stmmac: Set dma ring length before enabling the DMA
Date: Fri, 12 Apr 2019 16:21:31 +0200 [thread overview]
Message-ID: <d58bcc39-ca4e-eb1e-c2b6-93cc3d332c36@axis.com> (raw)
In-Reply-To: <20190412141654.GQ11568@sasha-vm>
On 4/12/19 4:16 PM, Sasha Levin wrote:
> On Fri, Apr 12, 2019 at 01:17:05PM +0200, Lars Persson wrote:
>> This was fixed in upstream by commit 7d9e6c5afab6 ("net: stmmac: Integrate
>> XGMAC into main driver flow") that is a new feature commit.
>>
>> We found a race condition in the DMA init sequence that hits if the
>> PHY already has link up during stmmac_hw_setup. Since the ring length
>> was programmed after enabling the RX path, we might receive a packet
>> before the correct ring length is programmed. When that happened we
>> could not get reliable interrupts for DMA RX and the MTL complained
>> about RX FIFO overrun.
>>
>> The correct init sequence according to the data book for DWC Ethernet
>> QoS 4.10 is:
>> 1. Write Ring length
>> 2. Write Descriptor list base address
>> 3. Start the DMA.
>>
>> Signed-off-by: Lars Persson <larper@axis.com>
>> Cc: stable@vger.kernel.org # 4.9.x
>> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
>> Cc: Alexandre Torgue <alexandre.torgue@st.com>
>> Cc: Jose Abreu <joabreu@synopsys.com>
>
> What about 4.14? 7d9e6c5afab6 isn't in it either.
>
I will send a separate patch for 4.14 in some days.
-Lars
next prev parent reply other threads:[~2019-04-12 14:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-12 11:17 [PATCH stable 4.9] net: stmmac: Set dma ring length before enabling the DMA Lars Persson
[not found] ` <20190412141654.GQ11568@sasha-vm>
2019-04-12 14:21 ` Lars Persson [this message]
2019-04-12 17:32 ` Sasha Levin
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=d58bcc39-ca4e-eb1e-c2b6-93cc3d332c36@axis.com \
--to=lars.persson@axis.com \
--cc=alexandre.torgue@st.com \
--cc=joabreu@synopsys.com \
--cc=larper@axis.com \
--cc=peppe.cavallaro@st.com \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.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