stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Sverdlin <alexander.sverdlin@gmail.com>
To: Vinod Koul <vinod.koul@intel.com>
Cc: dmaengine@vger.kernel.org,
	Dan Williams <dan.j.williams@intel.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH 1/2] dmaengine: ep93xx: Always start from BASE0
Date: Sun, 14 May 2017 15:33:34 +0200	[thread overview]
Message-ID: <34b23985-b164-4411-7ddb-79786ccfe4cf@gmail.com> (raw)
In-Reply-To: <20170514131424.GM6263@localhost>

Hello Vinod,

On 14/05/17 15:14, Vinod Koul wrote:
>> @@ -323,6 +331,10 @@ static int m2p_hw_setup(struct ep93xx_dma_chan *edmac)
>>  		| M2P_CONTROL_ENABLE;
>>  	m2p_set_control(edmac, control);
>>  
>> +	if (m2p_channel_nextbuf(edmac) != 0)
>> +		dev_warn(chan2dev(edmac), "M2P: Starting from BASE1\n");
> But then you are actually not restarting from BASE1 as you reset, so the
> warn is wrong.. Perhaps a more meaningful msg would be to say "expected 0
> but found 1, so resetting"

This is, maybe not so obvious, a warning, which should never fire. It just
proves, that I understand the HW correctly. As long as nobody sees the warning,
it's the case. And it proves that HW behaves according to user manual.
We can remove this warning completely.

Once again, the story is following:

- m2p_hw_setup() is always called after channel reset
- after reset channel expects to start from buffer 0
- therefore we must always start from buffer 0 <= this was not the case before
- we can read the expected "next buffer" from the controller => hence the warning
  maybe if there will be a bug somewhere and the channel will not be reset before
  next transfer, it will be triggered

Regards,
Alexander.

  reply	other threads:[~2017-05-14 13:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170513221327.10114-1-alexander.sverdlin@gmail.com>
2017-05-13 22:13 ` [PATCH 1/2] dmaengine: ep93xx: Always start from BASE0 Alexander Sverdlin
2017-05-14 13:14   ` Vinod Koul
2017-05-14 13:33     ` Alexander Sverdlin [this message]
2017-05-13 22:13 ` [PATCH 2/2] dmaengine: ep93xx: Don't drain the transfers in terminate_all() Alexander Sverdlin
2017-05-14 13:16   ` Vinod Koul

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=34b23985-b164-4411-7ddb-79786ccfe4cf@gmail.com \
    --to=alexander.sverdlin@gmail.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=stable@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).