Re: [PATCH 1/2] dma: Add interface to calculate data transferred
From: Shevchenko, Andriy
Date: Wed Oct 16 2013 - 04:36:45 EST
On Wed, 2013-10-16 at 11:08 +0530, Vinod Koul wrote:
> On Tue, Oct 15, 2013 at 08:55:20AM -0700, Dan Williams wrote:
> > On Tue, Oct 15, 2013 at 11:31 AM, Youquan Song
> > <youquan.song@xxxxxxxxxxxxxxx> wrote:
> > > On Sun, Oct 13, 2013 at 08:56:33PM +0530, Vinod Koul wrote:
> > >> On Fri, Oct 11, 2013 at 06:33:43AM -0700, Greg KH wrote:
> > >> > On Fri, Oct 11, 2013 at 05:42:17PM -0400, Youquan Song wrote:
> > > The issue is that when I using UART to transfer data between to COMs
> > > which using Designware DMA controller channel. But I check the specific
> > > DMA channel by "cat /sys/class/dma/dma0chan3/bytes_transferred", but it
> > > should all "0". I have transferred data by UART port, why its DMA
> > > channel report "0" bytes transferred? So I guess that it is possible
> > > the DMA device driver issue or the data does not use the Designware DMA channel
> > > fro transferred. After check the code, I notice only when the DMA
> > > channel used by network device driver and it will record how much data has been
> > > tranferred, why other device driver will not calculate it. Since DMA
> > > channel is used by other device driver, why only network is specific? since it is
> > > common interface, the current /sys/class/dma/dma0chan*/bytes_transferred has
> > > much possibility to mislead the user.
> >
> > Yes, and for that reason I think we should delete "
> > /sys/class/dma/dma0chan*/bytes_transferred" it really serves no useful
> > purpose besides "is my dma channel working" which can be determined by
> > other means.
> Well am going to take it a bit further and ask you why do we need the
> /sys/class/dma? I have never used it for slave work.
How user (who, f.e., would like to run dmatest) will know names of the
channels provided?
How could we see what channels of certain dma controller are requested /
busy from userspace?
--
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
Intel Finland Oy
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
¢éì®&Þ~º&¶¬+-±éÝ¥w®Ë±Êâmébìdz¹Þ)í
æèw*jg¬±¨¶Ýj/êäz¹Þà2Þ¨èÚ&¢)ß«a¶Úþø®G«éh®æj:+v¨wèÙ>W±êÞiÛaxPjØm¶ÿÃ-»+ùd_