From: "Måns Rullgård" <mans@mansr.com>
To: Mason <slash.tmp@free.fr>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
David Miller <davem@davemloft.net>,
netdev <netdev@vger.kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC PATCH v2 0/2] nb8800 suspend/resume support
Date: Wed, 02 Aug 2017 16:56:57 +0100 [thread overview]
Message-ID: <yw1xo9rygdyu.fsf@mansr.com> (raw)
In-Reply-To: <9e8e12b1-74e2-8323-ec16-eebda46b2a3d@free.fr> (Mason's message of "Wed, 2 Aug 2017 17:52:59 +0200")
Mason <slash.tmp@free.fr> writes:
> On 02/08/2017 17:36, Måns Rullgård wrote:
>
>> Mason wrote:
>>
>>> Looking at the tango-specific integration, I note this nugget:
>>>
>>> 1.5.4 Stopping & Starting the DMA
>>>
>>> This feature has been added to allow the software to stop and start
>>> the DMA without any issues.
>>>
>>> Procedure:
>>> 1- STOP:
>>> 2- Stop RX core;
>>> 3- Set OWN bit of all descriptor of the chain to 1;
>>> 4- Stop DMA by writing dma_stop bit to 1 in RX_DMA_Stop register
>>> 5- Wait around 100 clock cycles.
>>>
>>> The pending packets are held until the system will re-start.
>>>
>>> RE-START:
>>> 1- Clear dma_stop bit (note that if at the time of stopping the DMA,
>>> the next packet in the FIFO was an UDP packet, when clearing dma_stop,
>>> this packet will directly start being written in the DRAM since UDP
>>> packets are not controlled by the descriptor mechanism);
>>> 2- Program a new chain of descriptor;
>>> 3- Re-enable DMA (rx_ctrl register)
>>>
>>> rx_dma_stop:
>>> Software control to stop the Rx DMA.
>>> A write to this bit with "1" will gracefully stop the Rx DMA by after
>>> transferring the current packet. If more packets are pending they will
>>> be held until the software clears this bit.
>>>
>>> Hmmm, what do you think? This looks promising...
>>
>> This is only available in the more recent Sigma versions. Although it
>> is nicer, I didn't think it was worth the trouble to support both
>> methods since the older method should work on all chips.
>
> Well, from my perspective, the older method does not work on newer
> chips :-)
It does work on tango4.
What does the tango5 do if you flood it with packets faster than the
kernel can keep up with? That would make it hit the end of the rx
chain, which is apparently what makes it miserable with the current dma
stop code.
--
Måns Rullgård
next prev parent reply other threads:[~2017-08-02 15:56 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-01 16:32 [RFC PATCH v2 0/2] nb8800 suspend/resume support Mason
2017-08-01 16:37 ` [RFC PATCH v2 1/2] net: ethernet: nb8800: Reset HW block in ndo_open Mason
2017-08-02 11:02 ` Måns Rullgård
2017-08-02 11:54 ` Mason
2017-08-02 13:54 ` Andrew Lunn
2017-08-02 14:33 ` Måns Rullgård
2017-08-01 16:43 ` [RFC PATCH v2 2/2] net: ethernet: nb8800: Add suspend/resume support Mason
2017-08-02 14:41 ` [RFC PATCH v2 0/2] nb8800 " Mason
2017-08-02 15:26 ` Mason
2017-08-02 15:36 ` Måns Rullgård
2017-08-02 15:52 ` Mason
2017-08-02 15:56 ` Måns Rullgård [this message]
2017-08-02 16:07 ` Mason
2017-08-02 16:10 ` Måns Rullgård
2017-08-02 16:19 ` David Laight
2017-08-02 16:39 ` Mason
2017-08-02 16:43 ` Måns Rullgård
2017-08-02 17:31 ` Mason
2017-08-02 20:02 ` Mason
2017-08-03 8:34 ` Mason
2017-08-03 12:19 ` Måns Rullgård
2017-08-03 12:18 ` Måns Rullgård
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=yw1xo9rygdyu.fsf@mansr.com \
--to=mans@mansr.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=netdev@vger.kernel.org \
--cc=slash.tmp@free.fr \
/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).