Re: [PATCH 1/2] sh: extend .device_terminate_all() to record partial transfer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 18, 2010 at 05:30:02PM +0100, Guennadi Liakhovetski wrote:
> This patch extends the .device_terminate_all() method of the shdma driver 
> to return number of bytes transfered in the current descriptor.
> 
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@xxxxxx>
> ---
> diff --git a/arch/sh/include/asm/dmaengine.h b/arch/sh/include/asm/dmaengine.h
> index 9586e4a..bf2f30c 100644
> --- a/arch/sh/include/asm/dmaengine.h
> +++ b/arch/sh/include/asm/dmaengine.h
> @@ -70,4 +73,21 @@ struct sh_dmae_slave {
>  	struct sh_dmae_slave_config	*config;  /* Set by the driver */
>  };
>  
> +struct sh_dmae_regs {
> +	u32 sar; /* SAR / source address */
> +	u32 dar; /* DAR / destination address */
> +	u32 tcr; /* TCR / transfer count */
> +};
> +
> +struct sh_desc {
> +	struct sh_dmae_regs hw;
> +	struct list_head node;
> +	struct dma_async_tx_descriptor async_tx;
> +	enum dma_data_direction direction;
> +	dma_cookie_t cookie;
> +	size_t partial;
> +	int chunks;
> +	int mark;
> +};
> +
>  #endif

If we're going to expose this to drivers, can we please come up with a
better name than sh_desc? Even something as uninspired as sh_dmae_desc
would be better. This can be done as a follow-up patch though, since this
naming existed before these changes.
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux