All of lore.kernel.org
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	vkoul@kernel.org
Cc: sanyog.r.kale@intel.com, alsa-devel@alsa-project.org
Subject: Re: [PATCH 2/4] soundwire: cdns: fix check for number of messages
Date: Thu, 28 Mar 2019 14:58:27 +0000	[thread overview]
Message-ID: <28b05dc7-f269-0091-53ab-4390f613fc09@linaro.org> (raw)
In-Reply-To: <797b8525-dbcd-e52b-7b36-b80427a80186@linux.intel.com>



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.

--srini

> 
> Vinod, does this ring a bell?
> 
> 
>> +    if (defer->length > 1)
>>           return -ENOTSUPP;
>>       ret = cdns_prep_msg(cdns, msg, &cmd);
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2019-03-28 14:58 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 [this message]
2019-03-29  3:51       ` Sanyog Kale
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=28b05dc7-f269-0091-53ab-4390f613fc09@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=sanyog.r.kale@intel.com \
    --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 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.