From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: John Ogness <john.ogness@linutronix.de>, linux-kernel@vger.kernel.org
Cc: linux-serial@vger.kernel.org, Sekhar Nori <nsekhar@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: [PATCH 2/3] dmaenegine: edma: allow pause/resume for non-cyclic mode
Date: Mon, 27 Apr 2015 14:55:53 +0300 [thread overview]
Message-ID: <553E23C9.3030603@ti.com> (raw)
In-Reply-To: <87vbghaiva.fsf@linutronix.de>
On 04/27/2015 02:52 PM, John Ogness wrote:
> The 8250_omap serial driver relies on dmaengine_pause() actually
> pausing the DMA transfer. Before this patch dmaengine_pause() is
> a NOP for non-cylic DMA transfers. This allowed the 8250_omap
> driver to read DMA buffers while the DMA was still active,
> resulting in lost serial data.
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Signed-off-by: John Ogness <john.ogness@linutronix.de>
> ---
> drivers/dma/edma.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
> index bf09db7..88853af 100644
> --- a/drivers/dma/edma.c
> +++ b/drivers/dma/edma.c
> @@ -300,8 +300,7 @@ static int edma_dma_pause(struct dma_chan *chan)
> {
> struct edma_chan *echan = to_edma_chan(chan);
>
> - /* Pause/Resume only allowed with cyclic mode */
> - if (!echan->edesc || !echan->edesc->cyclic)
> + if (!echan->edesc)
> return -EINVAL;
>
> edma_pause(echan->ch_num);
> @@ -312,10 +311,6 @@ static int edma_dma_resume(struct dma_chan *chan)
> {
> struct edma_chan *echan = to_edma_chan(chan);
>
> - /* Pause/Resume only allowed with cyclic mode */
> - if (!echan->edesc->cyclic)
> - return -EINVAL;
> -
> edma_resume(echan->ch_num);
> return 0;
> }
>
--
Péter
WARNING: multiple messages have this Message-ID (diff)
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: John Ogness <john.ogness@linutronix.de>, <linux-kernel@vger.kernel.org>
Cc: <linux-serial@vger.kernel.org>, Sekhar Nori <nsekhar@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: [PATCH 2/3] dmaenegine: edma: allow pause/resume for non-cyclic mode
Date: Mon, 27 Apr 2015 14:55:53 +0300 [thread overview]
Message-ID: <553E23C9.3030603@ti.com> (raw)
In-Reply-To: <87vbghaiva.fsf@linutronix.de>
On 04/27/2015 02:52 PM, John Ogness wrote:
> The 8250_omap serial driver relies on dmaengine_pause() actually
> pausing the DMA transfer. Before this patch dmaengine_pause() is
> a NOP for non-cylic DMA transfers. This allowed the 8250_omap
> driver to read DMA buffers while the DMA was still active,
> resulting in lost serial data.
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Signed-off-by: John Ogness <john.ogness@linutronix.de>
> ---
> drivers/dma/edma.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
> index bf09db7..88853af 100644
> --- a/drivers/dma/edma.c
> +++ b/drivers/dma/edma.c
> @@ -300,8 +300,7 @@ static int edma_dma_pause(struct dma_chan *chan)
> {
> struct edma_chan *echan = to_edma_chan(chan);
>
> - /* Pause/Resume only allowed with cyclic mode */
> - if (!echan->edesc || !echan->edesc->cyclic)
> + if (!echan->edesc)
> return -EINVAL;
>
> edma_pause(echan->ch_num);
> @@ -312,10 +311,6 @@ static int edma_dma_resume(struct dma_chan *chan)
> {
> struct edma_chan *echan = to_edma_chan(chan);
>
> - /* Pause/Resume only allowed with cyclic mode */
> - if (!echan->edesc->cyclic)
> - return -EINVAL;
> -
> edma_resume(echan->ch_num);
> return 0;
> }
>
--
Péter
next prev parent reply other threads:[~2015-04-27 11:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-27 11:52 [PATCH 2/3] dmaenegine: edma: allow pause/resume for non-cyclic mode John Ogness
2015-04-27 11:52 ` John Ogness
2015-04-27 11:55 ` Peter Ujfalusi [this message]
2015-04-27 11:55 ` Peter Ujfalusi
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=553E23C9.3030603@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=bigeasy@linutronix.de \
--cc=gregkh@linuxfoundation.org \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=nsekhar@ti.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.