From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Vinod Koul <vinod.koul@intel.com>
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
tony@atomide.com, balbi@ti.com, Joel Fernandes <joelf@ti.com>,
Dan Williams <dan.j.williams@intel.com>,
dmaengine@vger.kernel.org
Subject: Re: [PATCH 1/7] dmaengine: edma: fix two faults which happen with the 8250_dma user
Date: Fri, 8 Aug 2014 18:29:50 +0200 [thread overview]
Message-ID: <20140808162950.GA12080@linutronix.de> (raw)
In-Reply-To: <20140731121702.GU8181@intel.com>
* Vinod Koul | 2014-07-31 17:47:02 [+0530]:
>On Tue, Jul 29, 2014 at 08:58:58PM +0200, Sebastian Andrzej Siewior wrote:
>> The rx path of the 8250_dma user in the RX-timeout case:
>> - it starts the RX transfer
>> - if the rx-timeout interrupt occures, it dmaengine_pause() the transfer
>> - step two is dmaengine_terminate_all() on this channel.
>Okay after this whole channel needs to be reset, which means all the
>descriptors are discared.
>> To make the upper case work better, this patch adds dma_cookie_complete()
>> to complete the cookie. Also it adds is an additional check for echan->edesc
>> in case the channel has no descriptor assigned.
>I think we are fixing the behvaiour rather than cause. terminate_all(()
>needs to do a proper cleanup of the channel
In case you are not ignoring me but $reason here is an example that does
not work (with both drivers);
desc = dmaengine_prep_slave_single(rxchan, …);
rx_cookie = dmaengine_submit(desc);
dma_async_issue_pending(rxchan);
ssleep(2);
/* Now assume that the transfer did not start */
st = dmaengine_tx_status(rxchan, rx_cookie, NULL);
/* st is now DMA_IN_PROGRESS as expected */
dmaengine_terminate_all(rxchan);
st = dmaengine_tx_status(rxchan, rx_cookie, NULL);
/* st is still DMA_IN_PROGRESS but _I_ expect DMA_COMPLETE because
* it has been terminated / canceled
*/
Both dma driver clean up all / terminate all descriptors as required but
_none_ of them completes the cookie. As a result dma_cookie_status()
still thinks that the transfer is in progress.
Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: bigeasy@linutronix.de (Sebastian Andrzej Siewior)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/7] dmaengine: edma: fix two faults which happen with the 8250_dma user
Date: Fri, 8 Aug 2014 18:29:50 +0200 [thread overview]
Message-ID: <20140808162950.GA12080@linutronix.de> (raw)
In-Reply-To: <20140731121702.GU8181@intel.com>
* Vinod Koul | 2014-07-31 17:47:02 [+0530]:
>On Tue, Jul 29, 2014 at 08:58:58PM +0200, Sebastian Andrzej Siewior wrote:
>> The rx path of the 8250_dma user in the RX-timeout case:
>> - it starts the RX transfer
>> - if the rx-timeout interrupt occures, it dmaengine_pause() the transfer
>> - step two is dmaengine_terminate_all() on this channel.
>Okay after this whole channel needs to be reset, which means all the
>descriptors are discared.
>> To make the upper case work better, this patch adds dma_cookie_complete()
>> to complete the cookie. Also it adds is an additional check for echan->edesc
>> in case the channel has no descriptor assigned.
>I think we are fixing the behvaiour rather than cause. terminate_all(()
>needs to do a proper cleanup of the channel
In case you are not ignoring me but $reason here is an example that does
not work (with both drivers);
desc = dmaengine_prep_slave_single(rxchan, ?);
rx_cookie = dmaengine_submit(desc);
dma_async_issue_pending(rxchan);
ssleep(2);
/* Now assume that the transfer did not start */
st = dmaengine_tx_status(rxchan, rx_cookie, NULL);
/* st is now DMA_IN_PROGRESS as expected */
dmaengine_terminate_all(rxchan);
st = dmaengine_tx_status(rxchan, rx_cookie, NULL);
/* st is still DMA_IN_PROGRESS but _I_ expect DMA_COMPLETE because
* it has been terminated / canceled
*/
Both dma driver clean up all / terminate all descriptors as required but
_none_ of them completes the cookie. As a result dma_cookie_status()
still thinks that the transfer is in progress.
Sebastian
WARNING: multiple messages have this Message-ID (diff)
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Vinod Koul <vinod.koul@intel.com>
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
tony@atomide.com, balbi@ti.com, Joel Fernandes <joelf@ti.com>,
Dan Williams <dan.j.williams@intel.com>,
dmaengine@vger.kernel.org
Subject: Re: [PATCH 1/7] dmaengine: edma: fix two faults which happen with the 8250_dma user
Date: Fri, 8 Aug 2014 18:29:50 +0200 [thread overview]
Message-ID: <20140808162950.GA12080@linutronix.de> (raw)
In-Reply-To: <20140731121702.GU8181@intel.com>
* Vinod Koul | 2014-07-31 17:47:02 [+0530]:
>On Tue, Jul 29, 2014 at 08:58:58PM +0200, Sebastian Andrzej Siewior wrote:
>> The rx path of the 8250_dma user in the RX-timeout case:
>> - it starts the RX transfer
>> - if the rx-timeout interrupt occures, it dmaengine_pause() the transfer
>> - step two is dmaengine_terminate_all() on this channel.
>Okay after this whole channel needs to be reset, which means all the
>descriptors are discared.
>> To make the upper case work better, this patch adds dma_cookie_complete()
>> to complete the cookie. Also it adds is an additional check for echan->edesc
>> in case the channel has no descriptor assigned.
>I think we are fixing the behvaiour rather than cause. terminate_all(()
>needs to do a proper cleanup of the channel
In case you are not ignoring me but $reason here is an example that does
not work (with both drivers);
desc = dmaengine_prep_slave_single(rxchan, …);
rx_cookie = dmaengine_submit(desc);
dma_async_issue_pending(rxchan);
ssleep(2);
/* Now assume that the transfer did not start */
st = dmaengine_tx_status(rxchan, rx_cookie, NULL);
/* st is now DMA_IN_PROGRESS as expected */
dmaengine_terminate_all(rxchan);
st = dmaengine_tx_status(rxchan, rx_cookie, NULL);
/* st is still DMA_IN_PROGRESS but _I_ expect DMA_COMPLETE because
* it has been terminated / canceled
*/
Both dma driver clean up all / terminate all descriptors as required but
_none_ of them completes the cookie. As a result dma_cookie_status()
still thinks that the transfer is in progress.
Sebastian
next prev parent reply other threads:[~2014-08-08 16:29 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-29 18:58 dma support for 8250-omap serial driver Sebastian Andrzej Siewior
2014-07-29 18:58 ` Sebastian Andrzej Siewior
2014-07-29 18:58 ` [PATCH 1/7] dmaengine: edma: fix two faults which happen with the 8250_dma user Sebastian Andrzej Siewior
2014-07-29 18:58 ` Sebastian Andrzej Siewior
2014-07-31 12:17 ` Vinod Koul
2014-07-31 12:17 ` Vinod Koul
2014-07-31 13:06 ` Sebastian Andrzej Siewior
2014-07-31 13:06 ` Sebastian Andrzej Siewior
2014-08-08 16:29 ` Sebastian Andrzej Siewior [this message]
2014-08-08 16:29 ` Sebastian Andrzej Siewior
2014-08-08 16:29 ` Sebastian Andrzej Siewior
2014-08-19 15:12 ` Vinod Koul
2014-08-19 15:12 ` Vinod Koul
2014-08-19 15:12 ` Vinod Koul
2014-08-21 13:09 ` Sebastian Andrzej Siewior
2014-08-21 13:09 ` Sebastian Andrzej Siewior
2014-08-21 13:09 ` Sebastian Andrzej Siewior
2014-08-28 7:06 ` Vinod Koul
2014-08-28 7:06 ` Vinod Koul
2014-08-28 9:06 ` Sebastian Andrzej Siewior
2014-08-28 9:06 ` Sebastian Andrzej Siewior
2014-08-28 9:06 ` Sebastian Andrzej Siewior
2014-07-29 18:58 ` [PATCH 2/7] dmaengine: omap-dma: complete the transfer on terminate_all Sebastian Andrzej Siewior
2014-07-29 18:58 ` Sebastian Andrzej Siewior
2014-07-29 19:06 ` Sebastian Andrzej Siewior
2014-07-29 19:06 ` Sebastian Andrzej Siewior
2014-07-29 18:59 ` [PATCH 3/7] serial: 8250_dma: continue TX dma on dma error Sebastian Andrzej Siewior
2014-07-29 18:59 ` Sebastian Andrzej Siewior
2014-07-29 18:59 ` Sebastian Andrzej Siewior
2014-07-29 18:59 ` [RFC PATCH 4/7] serial: 8250_dma: enqueue RX dma again on completion Sebastian Andrzej Siewior
2014-07-29 18:59 ` Sebastian Andrzej Siewior
2014-07-29 18:59 ` [RFC PATCH 5/7] arm: dts: am33xx: add DMA properties for UART Sebastian Andrzej Siewior
2014-07-29 18:59 ` Sebastian Andrzej Siewior
2014-07-29 18:59 ` Sebastian Andrzej Siewior
2014-07-29 18:59 ` [RFC PATCH 6/7] arm: dts: dra7: " Sebastian Andrzej Siewior
2014-07-29 18:59 ` Sebastian Andrzej Siewior
2014-07-29 18:59 ` Sebastian Andrzej Siewior
2014-07-29 18:59 ` [RFC PATCH 7/7] tty: serial: 8250: omap: add dma support Sebastian Andrzej Siewior
2014-07-29 18:59 ` Sebastian Andrzej Siewior
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=20140808162950.GA12080@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=balbi@ti.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=joelf@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=tony@atomide.com \
--cc=vinod.koul@intel.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.