From: Joel Fernandes <joelf-l0cyMroinI0@public.gmane.org>
To: Vinod Koul <vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Jon Ringle <jon-7zJyie9iPacdnm+yROfE0A@public.gmane.org>
Cc: Linux DaVinci Mailing List
<davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org>,
"Ringle,
Jonathan"
<Jonathan.Ringle-gkqdKIIuv0Hby3iVrkZq2A@public.gmane.org>,
DMA Engine Mailing List
<dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Dan Williams
<dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
"linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] dma: edma: fix incorrect SG list handling
Date: Tue, 18 Mar 2014 13:46:04 -0500 [thread overview]
Message-ID: <5328946C.3010508@ti.com> (raw)
In-Reply-To: <20140318152840.GD1976-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
On 03/18/2014 10:28 AM, Vinod Koul wrote:
> On Mon, Mar 17, 2014 at 09:14:14AM -0400, Jon Ringle wrote:
>> On Mon, 17 Mar 2014, Sekhar Nori wrote:
>>
>>> Hi Jon,
>>>
>>> On Monday 17 March 2014 06:28 PM, Jon Ringle wrote:
>>>>
>>>> On Mon, 17 Mar 2014, Sekhar Nori wrote:
>>>>
>>>>> The code to handle any length SG lists calls edma_resume()
>>>>> even before edma_start() is called. This is incorrect
>>>>> because edma_resume() enables edma events on the channel
>>>>> after which CPU (in edma_start) cannot clear posted
>>>>> events by writing to ECR (per the EDMA user's guide).
>>>>>
>>>>> Because of this EDMA transfers fail to start if due
>>>>> to some reason there is a pending EDMA event registered
>>>>> even before EDMA transfers are started. This can happen if
>>>>> an EDMA event is a byproduct of device initialization.
>>>>>
>>>>> Fix this by calling edma_resume() only if it is not the
>>>>> first batch of MAX_NR_SG elements.
>>>>>
>>>>> Without this patch, MMC/SD fails to function on DA850 EVM
>>>>> with DMA. The behaviour is triggered by specific IP and
>>>>> this can explain why the issue was not reported before
>>>>> (example with MMC/SD on AM335x).
>>>>>
>>>>> Tested on DA850 EVM and AM335x EVM-SK using MMC/SD card.
>>>>>
>>>>> Cc: <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> # v3.12.x+
>>>>> Cc: Joel Fernandes <joelf-l0cyMroinI0@public.gmane.org>
>>>>> Reported-by: Jon Ringle <jringle-gkqdKIIuv0Hby3iVrkZq2A@public.gmane.org>
>>>>> Signed-off-by: Sekhar Nori <nsekhar-l0cyMroinI0@public.gmane.org>
>>>>> ---
>>>>> Jon, can you please confirm this fixes the issue you
>>>>> reported?
>>>>
>>>> The patch does not apply on linux-3.12 due to changes to the 3 context
>>>> lines at the start of the hunk.
>>>>
>>>> But, I manually fixed up the code and it does fix the issue on our AM1808
>>>> board.
>>>
>>> Thanks for the testing. The patch is meant for latest mainline but based
>>> on what you said, a manual backport to v3.12-stable will be required.
>>>
>>> Can you please reply with a formal Tested-by: ?
>>
>> Tested-by: Jon Ringle <jringle-gkqdKIIuv0Hby3iVrkZq2A@public.gmane.org>
> where is this patch, somehow am not able to find in my inbox or archives...
>
I found it archived here:
http://comments.gmane.org/gmane.linux.davinci/28569
Patch doesn't breaking anything for > MAX_NR_SG list size on AM335x, so
it looks good.
Acked-by: Joel Fernandes <joelf-l0cyMroinI0@public.gmane.org>
Regards,
-Joel
next parent reply other threads:[~2014-03-18 18:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1395057448-22904-1-git-send-email-nsekhar@ti.com>
[not found] ` <alpine.DEB.2.02.1403170854570.9730@jringle-ubuntu>
[not found] ` <5326F2BF.6040702@ti.com>
[not found] ` <alpine.DEB.2.02.1403170913110.9730@jringle-ubuntu>
[not found] ` <20140318152840.GD1976@intel.com>
[not found] ` <20140318152840.GD1976-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-03-18 18:46 ` Joel Fernandes [this message]
2014-03-19 4:39 ` [PATCH] dma: edma: fix incorrect SG list handling Sekhar Nori
2014-03-19 10:20 ` Sekhar Nori
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=5328946C.3010508@ti.com \
--to=joelf-l0cymroini0@public.gmane.org \
--cc=Jonathan.Ringle-gkqdKIIuv0Hby3iVrkZq2A@public.gmane.org \
--cc=dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org \
--cc=dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=jon-7zJyie9iPacdnm+yROfE0A@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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).