From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
balbi@ti.com, george.cherian@ti.com,
Vinod Koul <vinod.koul@intel.com>, Dan Williams <djbw@fb.com>
Subject: Re: [PATCH 15/16] dmaengine: add transfered member to dma_async_tx_descriptor
Date: Mon, 22 Jul 2013 22:52:44 +0400 [thread overview]
Message-ID: <51ED7F7C.2080205@cogentembedded.com> (raw)
In-Reply-To: <1374516607-2705-16-git-send-email-bigeasy@linutronix.de>
On 07/22/2013 10:10 PM, Sebastian Andrzej Siewior wrote:
> In USB RX path it is possible that the we receive less bytes than
> requested. Take the following example:
> The driver for USB-to-UART submits an URB with 256 bytes in size and the
> dmaengine driver in turn programs a transfer of 256 bytes. The transfer
> is programmed and the dma engine waits for the data to arrive. Once data
> is sent on the UART the dma engine begins to move data. If there was
> only one data byte in the USB packet received then the DMA engine will
> only move one byte due to USB restrictions / rules. The real size of the
> transfer has to be notified to the user / caller so he set this to the
> caller.
> This patch adds the transfered member to the dma_async_tx_descriptor
> where the caller can obtain the final size.
> Cc: Vinod Koul <vinod.koul@intel.com>
> Cc: Dan Williams <djbw@fb.com>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
> include/linux/dmaengine.h | 3 +++
> 1 file changed, 3 insertions(+)
> diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
> index cb286b1..c3a4635 100644
> --- a/include/linux/dmaengine.h
> +++ b/include/linux/dmaengine.h
> @@ -403,6 +403,8 @@ typedef void (*dma_async_tx_callback)(void *dma_async_param);
> * @tx_submit: set the prepared descriptor(s) to be executed by the engine
> * @callback: routine to call after this operation is complete
> * @callback_param: general parameter to pass to the callback routine
> + * @transfered: number of bytes that were really transfered in case the channel
> + * transfered less than requested.
> * ---async_tx api specific fields---
> * @next: at completion submit this descriptor
> * @parent: pointer to the next level up in the dependency chain
> @@ -416,6 +418,7 @@ struct dma_async_tx_descriptor {
> dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *tx);
> dma_async_tx_callback callback;
> void *callback_param;
> + unsigned int transfered;
Correct grammar is "transferred".
WBR, Sergei
next prev parent reply other threads:[~2013-07-22 18:52 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-22 18:09 am33x: multiple instances and dma support, v2 Sebastian Andrzej Siewior
2013-07-22 18:09 ` [PATCH 01/16] usb: musb: dsps: init / shutdown the phy Sebastian Andrzej Siewior
2013-07-25 14:32 ` Felipe Balbi
2013-07-22 18:09 ` [PATCH 02/16] usb: phy: phy-nop: add support for am335x PHY Sebastian Andrzej Siewior
2013-07-25 14:33 ` Felipe Balbi
2013-07-25 14:45 ` Sebastian Andrzej Siewior
2013-07-25 14:54 ` Felipe Balbi
2013-07-22 18:09 ` [PATCH 03/16] usb: musb: dsps: remove the hardcoded phy pieces Sebastian Andrzej Siewior
2013-07-22 18:09 ` [PATCH 04/16] usb: musb: remove ti81xx pieces from musb Sebastian Andrzej Siewior
2013-07-22 18:09 ` [PATCH 05/16] usb: musb: dsps: use proper child nodes Sebastian Andrzej Siewior
2013-07-23 6:46 ` George Cherian
2013-07-23 9:15 ` Sebastian Andrzej Siewior
2013-07-22 18:09 ` [PATCH 06/16] usb: musb: dsps: rename ti81xx_driver_data to am33xx_driver_data Sebastian Andrzej Siewior
2013-07-23 6:04 ` George Cherian
2013-07-23 9:09 ` Sebastian Andrzej Siewior
2013-07-23 9:14 ` George Cherian
[not found] ` <CADYTM3avh7GFTDQW01FnojKZkmL0_hi+=K-VVwCw5peJL2hwTA@mail.gmail.com>
2013-07-23 19:09 ` Bin Liu
2013-07-25 14:41 ` Sebastian Andrzej Siewior
2013-07-25 15:12 ` Bin Liu
2013-07-25 15:16 ` Sebastian Andrzej Siewior
2013-07-25 15:28 ` Bin Liu
2013-07-25 16:11 ` Felipe Balbi
2013-07-26 9:11 ` [PATCH 06/16 => 1/2] " Sebastian Andrzej Siewior
2013-07-26 9:11 ` [PATCH 06/16 => 2/2] usb: musb: dsps: remove EOI access Sebastian Andrzej Siewior
2013-07-25 15:37 ` [PATCH 06/16] usb: musb: dsps: rename ti81xx_driver_data to am33xx_driver_data Felipe Balbi
2013-07-22 18:09 ` [PATCH 07/16] usb: musb: replace ifndef with ifdef for CONFIG_MUSB_PIO_ONLY Sebastian Andrzej Siewior
2013-07-22 18:09 ` [PATCH 08/16] usb: musb: dma: merge ->start/stop into create/destroy Sebastian Andrzej Siewior
2013-07-22 18:10 ` [PATCH 09/16] usb: musb: provide empty dma_controller_create() in PIO mode Sebastian Andrzej Siewior
2013-07-22 18:10 ` [PATCH 10/16] usb: musb: remove a few is_dma_capable() in init/exit code Sebastian Andrzej Siewior
2013-07-22 18:10 ` [PATCH 11/16] usb: musb: core: call dma_controller_destroy() in the err path Sebastian Andrzej Siewior
2013-07-22 18:10 ` [PATCH 12/16] usb: musb: unmap reqs in musb_gadget_queue()'s error case Sebastian Andrzej Siewior
2013-07-22 18:10 ` [PATCH 13/16] usb: musb: do not change dev's dma_mask Sebastian Andrzej Siewior
2013-07-22 18:10 ` [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal Sebastian Andrzej Siewior
[not found] ` <CADYTM3a5xzs+-VCTeKLGiRjo7JOqOJ5H4EWDACpTMovY5_ooRA@mail.gmail.com>
2013-07-23 17:31 ` Sebastian Andrzej Siewior
2013-07-23 18:55 ` Bin Liu
2013-07-26 15:44 ` Sebastian Andrzej Siewior
2013-07-26 16:31 ` Sebastian Andrzej Siewior
2013-07-26 17:53 ` Bin Liu
2013-07-26 18:17 ` Bin Liu
2013-07-26 18:22 ` Sebastian Andrzej Siewior
2013-07-26 18:29 ` Bin Liu
2013-07-26 19:55 ` Sebastian Andrzej Siewior
2013-07-26 20:15 ` Bin Liu
2013-07-26 20:35 ` Sebastian Andrzej Siewior
2013-07-27 3:07 ` Bin Liu
2013-07-29 16:53 ` Sebastian Andrzej Siewior
2013-07-29 17:26 ` Bin Liu
2013-07-29 17:51 ` Sebastian Andrzej Siewior
2013-07-29 18:41 ` Bin Liu
2013-08-09 16:03 ` [PATCH] usb: musb: am335x: Do not remove the session bin HOST-only mode Sebastian Andrzej Siewior
2013-08-09 20:30 ` Sergei Shtylyov
2013-08-13 7:14 ` Sebastian Andrzej Siewior
2013-08-13 13:03 ` Bin Liu
2013-08-13 13:17 ` Sebastian Andrzej Siewior
2013-08-13 13:33 ` Bin Liu
2013-08-13 13:44 ` Sebastian Andrzej Siewior
2013-08-13 14:01 ` Bin Liu
2013-08-13 14:23 ` Sebastian Andrzej Siewior
2013-08-13 14:32 ` Bin Liu
2013-08-14 18:17 ` Sebastian Andrzej Siewior
2013-08-14 18:43 ` Bin Liu
2013-07-22 18:10 ` [PATCH 15/16] dmaengine: add transfered member to dma_async_tx_descriptor Sebastian Andrzej Siewior
2013-07-22 18:52 ` Sergei Shtylyov [this message]
2013-07-23 17:12 ` Sebastian Andrzej Siewior
2013-07-25 14:57 ` Lars-Peter Clausen
2013-07-25 15:12 ` Sebastian Andrzej Siewior
2013-07-25 15:32 ` Lars-Peter Clausen
2013-07-26 9:30 ` Sebastian Andrzej Siewior
2013-07-29 11:39 ` Vinod Koul
2013-07-29 12:33 ` Sebastian Andrzej Siewior
2013-07-22 18:10 ` [PATCH 16/16] usb/musb dma: add cppi41 dma driver 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=51ED7F7C.2080205@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=balbi@ti.com \
--cc=bigeasy@linutronix.de \
--cc=djbw@fb.com \
--cc=george.cherian@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--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 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).