alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Sanyog Kale <sanyog.r.kale@intel.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: vkoul@kernel.org,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	alsa-devel@alsa-project.org
Subject: Re: [PATCH 2/4] soundwire: cdns: fix check for number of messages
Date: Fri, 29 Mar 2019 09:21:45 +0530	[thread overview]
Message-ID: <20190329035145.GA9440@buildpc-HP-Z230> (raw)
In-Reply-To: <28b05dc7-f269-0091-53ab-4390f613fc09@linaro.org>

On Thu, Mar 28, 2019 at 02:58:27PM +0000, Srinivas Kandagatla wrote:
> 
> 
> On 28/03/2019 14:03, Pierre-Louis Bossart wrote:
> > > ---
> > > ?? drivers/soundwire/cadence_master.c | 2 +-
> > > ?? 1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/soundwire/cadence_master.c
> > > b/drivers/soundwire/cadence_master.c
> > > index cb6a331f448a..d41adbc57918 100644
> > > --- a/drivers/soundwire/cadence_master.c
> > > +++ b/drivers/soundwire/cadence_master.c
> > > @@ -434,7 +434,7 @@ cdns_xfer_msg_defer(struct sdw_bus *bus,
> > > ?????????? int cmd = 0, ret;
> > > ?????????? /* for defer only 1 message is supported */
> > > -?????? if (msg->len > 1)
> > 
> > I am not sure this is a typo.
> > 
> 
> Am bit confused with defer data-structure itself.
> 
> I was assuming that defer->length is number of sdw messages in the
> structure. If its same as message lenght then sdw_msg->len and
> sdw_defer->length are totally redundant. May be we should get rid of lenght
> field in defer to avoid confusion?
> 
> > IRRC the hardware only defer e.g. a single write that can perform bank
> > switches and writes at specific times indicated with an SSP. What's more
> okay got it.
> Does that mean that candence controller can only support 1 byte defer
> transfers?
> 
> > is that the defer structure is actually modified below this code (not
> > shown in the diff) to set defer>length = msg->len, so testing before the
> > value is set looks more suspicious than the current code.
> 
> removing the length field in defer should get rid of such instances.
>

defer->length is passed as count in cdns_fill_msg_resp function while
processing response of defer message. we can as well use msg->len and
remove length from sdw_defer. I dont see any other instance where
defer->length is used.

> --srini
> 
> > 
> > Vinod, does this ring a bell?
> > 
> > 
> > > +?????? if (defer->length > 1)
> > > ?????????????????? return -ENOTSUPP;
> > > ?????????? ret = cdns_prep_msg(cdns, msg, &cmd);

-- 

  reply	other threads:[~2019-03-29  3:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-28 13:41 [PATCH 0/4] soundwire: few trival fixes and cleanups Srinivas Kandagatla
2019-03-28 13:41 ` [PATCH 1/4] soundwire: add module_sdw_driver helper macro Srinivas Kandagatla
2019-03-29  5:38   ` Vinod Koul
2019-03-28 13:41 ` [PATCH 2/4] soundwire: cdns: fix check for number of messages Srinivas Kandagatla
2019-03-28 14:03   ` Pierre-Louis Bossart
2019-03-28 14:58     ` Srinivas Kandagatla
2019-03-29  3:51       ` Sanyog Kale [this message]
2019-03-29  5:54       ` Vinod Koul
2019-03-29 10:06         ` Srinivas Kandagatla
2019-03-28 13:41 ` [PATCH 3/4] soundwire: bus: check if pm runtime is enabled before calling Srinivas Kandagatla
2019-03-28 13:55   ` Pierre-Louis Bossart
2019-03-28 14:37     ` Srinivas Kandagatla
2019-03-29  5:58       ` Vinod Koul
2019-03-29 10:02         ` Srinivas Kandagatla
2019-04-05 15:26     ` Ranjani Sridharan
2019-03-28 13:41 ` [PATCH 4/4] soundwire: remove unused struct sdw_bus_conf definition Srinivas Kandagatla

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=20190329035145.GA9440@buildpc-HP-Z230 \
    --to=sanyog.r.kale@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=vkoul@kernel.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).