linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: vinod.koul@intel.com (Vinod Koul)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] dmaengine: at_xdmac: fix slave configuration issue
Date: Mon, 4 May 2015 13:55:36 +0530	[thread overview]
Message-ID: <20150504082536.GB3521@localhost> (raw)
In-Reply-To: <20150427083358.GG26450@odux.rfo.atmel.com>

On Mon, Apr 27, 2015 at 10:33:58AM +0200, Ludovic Desroches wrote:
> Hi Vinod,
> 
> On Mon, Apr 27, 2015 at 09:03:28AM +0530, Vinod Koul wrote:
> > On Thu, Apr 16, 2015 at 05:04:00PM +0200, Ludovic Desroches wrote:
> > > When doing the slave configuration, an error is returned if the maxburst
> > > value is not supported. The bug comes from the fact that we always check
> > > the maxburst for both directions but in the case of an unidirectional
> > > channel, only one is set.
> > While setting the slave configuration we are not tied to a channel
> > direction, the direction is passed usin prep_ method. So from that
> > prespective a channle can be used for tx and rx with same slave config set.
> > 
> > Now if we were invoking at_xdmac_set_slave_config from prep_ calls then it
> > would have been fine but here we are checking when the slave config is set
> > so this is not right. You should check maxburst at runtime then...
> > 
> 
> I don't understand why we should wait before checking the
> configuration... Some channels are unidirectionnal so implicitly we know
> the direction at configuration time because the device will fill only a
> part of the dma_slave_config structure. For example, the atmel usart
> requests a tx and a rx channels. When configuring the tx channel, only
> the dst_ fields of the dma_slave_config structure are filled. Is it a
> bad behavior?
> 
> The change introduced by this patch doesn't really care about the
> direction, it only tells that if the device only fills src_ fields then
> I don't have to check fields not configured.
Well that is because we started with the assumption that channels are
uni-direction and we know that. From client side we shouldn't care
how channel looks like and which dma controller we are talking. The point is
to make clients unaware and use the dmaengine API

-- 
~Vinod

  reply	other threads:[~2015-05-04  8:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-16 15:04 [PATCH] dmaengine: at_xdmac: fix slave configuration issue Ludovic Desroches
2015-04-27  3:33 ` Vinod Koul
2015-04-27  8:33   ` Ludovic Desroches
2015-05-04  8:25     ` Vinod Koul [this message]
2015-05-04  9:12       ` Ludovic Desroches
2015-05-04 10:36         ` Vinod Koul
2015-05-04 14:58           ` Ludovic Desroches
2015-05-06  3:33             ` Vinod Koul
2015-05-06  8:13               ` Ludovic Desroches
2015-05-08  9:22                 ` 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=20150504082536.GB3521@localhost \
    --to=vinod.koul@intel.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 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).