All of lore.kernel.org
 help / color / mirror / Atom feed
From: elen.song@atmel.com (Elen Song)
To: linux-arm-kernel@lists.infradead.org
Subject: [question] some question about the residue
Date: Mon, 26 Nov 2012 18:37:28 +0800	[thread overview]
Message-ID: <50B34668.1090402@atmel.com> (raw)
In-Reply-To: <20121126102200.GB19440@n2100.arm.linux.org.uk>

On 2012-11-26 18:22, Russell King - ARM Linux wrote:
> On Mon, Nov 26, 2012 at 03:35:42PM +0800, Elen Song wrote:
>> On 2012-11-26 14:49, Vinod Koul wrote:
>>> On Mon, 2012-11-26 at 14:43 +0800, Elen Song wrote:
>>>> Hi All:
>>>>
>>>> 	I got a question about the residue in struct dma_tx_state:
>>>>
>>>> 	I wonder what residue means, is it the current descriptor residue or
>>>>
>>>> 	the total dma buffer residue?
>>> You read the status for descriptor, so it means this is residue for said
>>> descriptor.
>>>
>>>
>> Hi Koul:
>>
>> Well , I don't get it , if I read the status of a LLI, is it means the
>> residue of total LLI length?
>>
>> I saw driver/dma/amba-pl08x.c drivers/dma/coh901318.c, if read status of
>> a LLI, residue is the remain of LLI, not only
>> current descriptor.
>>
>> 1 patch from Russel King how he realize device_tx_status said:
>>
>> [PATCH] ARM: PL08x: clean up LLI lookup
>> As the LLI list is an array, we can use maths to locate which LLI
>> index we're currently at, and then sum up the remaining LLI entries
>> until we reach the end of the list.
>>
>> Is it right?
> It is as far as fixing a pretty major bug in the driver, but it doesn't
> fix the other bug in the driver where it sums up all outstanding
> descriptors, which pre-dates the understanding of 'residue'.
So residue actually means current active descriptor remain, it should 
not sums up all outstanding descriptors.
the way amba-p108x.c and coh901318.c is wrong , right?

best regards

  reply	other threads:[~2012-11-26 10:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-26  6:43 [question] some question about the residue Elen Song
2012-11-26  6:49 ` Vinod Koul
2012-11-26  7:35   ` Elen Song
2012-11-26 10:22     ` Russell King - ARM Linux
2012-11-26 10:37       ` Elen Song [this message]
2012-11-26 10:40         ` Russell King - ARM Linux
2012-11-27  2:39           ` Elen Song
2012-11-26 10:19 ` Russell King - ARM Linux
  -- strict thread matches above, loose matches on Subject: below --
2012-11-26  3:19 Elen Song

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=50B34668.1090402@atmel.com \
    --to=elen.song@atmel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.