Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Cezary Rojewski <cezary.rojewski@intel.com>
Cc: alsa-devel@alsa-project.org, broonie@kernel.org, tiwai@suse.com,
	lgirdwood@gmail.com
Subject: Re: [PATCH v4 2/2] ASoC: Intel: Skylake: large_config_get overhaul
Date: Thu, 8 Aug 2019 12:01:42 -0500	[thread overview]
Message-ID: <0b46e718-6bf1-b003-3eea-d8c46c10f39f@linux.intel.com> (raw)
In-Reply-To: <1c4c546d-e451-7484-1dfe-adb575cfe46f@intel.com>



On 8/8/19 11:52 AM, Cezary Rojewski wrote:
> On 2019-08-08 16:50, Pierre-Louis Bossart wrote:
>> Thanks Cezary, the split makes it much easier to review. I have a 
>> couple of minor comments below, looks good otherwise.
>>
>> On 8/8/19 5:24 AM, Cezary Rojewski wrote:
>>> LARGE_CONFIG_GET is mainly used to retrieve requested module parameters
>>> but it may also carry TX payload with them. Update its implementation to
>>> account for both TX and RX data.
>>> First reply.header carries total payload size within data_off_sizefield.
>>> Make use of reply.header to realloc returned buffer with correct size.
>>>
>>> Failure of IPC request is permissive - error-payload may be returned, an
>>> informative data why GET for given param failed - and thus function
>>> should not collapse before entire processing is finished. Caller is
>>> responsible for checking returned payload and bytes parameters.
>>
>> but that is the same as before, yes? this patch does not change the 
>> behavior on errors?
> 
> To evaluate this statement you have to take a look at old code (before 
> addition of reply saving):
> 
> ret = sst_ipc_tx_message_wait(ipc, *ipc_header, NULL, 0,
>                ((char *)param) + data_offset,
>                msg->param_data_size);
> if (ret < 0) {
>      dev_err(ipc->dev,
>          "ipc: get large config fail, err: %d\n", ret);
>      return ret;
> }
> 
> Third and four parameter for sst_ipc_tx_message_wait denoted tx_data and 
> tx_size in older version. As you can see, these are empty - no payload 
> is carried, _get_ only awaits reply and copied data retrieved (breaks 
> vendor case as described earlier).
> 
> Immediately after failure, function was collapsing. Some data might have 
> been appended to "param" but size is unknown. However, due to lack of 
> retrieval of said size, indeed one may say the behavior on errors did 
> not really change. It's vital to highlight that changes added here (2/2 
> patch) do not make function return right after receiving error though - 
> buffer and size are updated for the caller before leaving the scope.

ok, got it. The change actually happened in patch1, I couldn't see the 
change in that specific patch.
Thanks for the precisions.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

      reply	other threads:[~2019-08-08 17:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08 10:24 [PATCH v4 2/2] ASoC: Intel: Skylake: large_config_get overhaul Cezary Rojewski
2019-08-08 14:50 ` Pierre-Louis Bossart
2019-08-08 16:52   ` Cezary Rojewski
2019-08-08 17:01     ` Pierre-Louis Bossart [this message]

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=0b46e718-6bf1-b003-3eea-d8c46c10f39f@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=tiwai@suse.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