lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 24 May 2023 12:32:52 +0530
From:   "Mukunda,Vijendar" <vijendar.mukunda@....com>
To:     Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
        broonie@...nel.org
Cc:     alsa-devel@...a-project.org, Basavaraj.Hiregoudar@....com,
        Sunil-kumar.Dommati@....com, Mastan.Katragadda@....com,
        Arungopal.kondaveeti@....com, mario.limonciello@....com,
        Liam Girdwood <lgirdwood@...il.com>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>,
        Syed Saba Kareem <Syed.SabaKareem@....com>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V2 1/9] ASoC: amd: ps: create platform devices based on
 acp config

On 23/05/23 19:59, Pierre-Louis Bossart wrote:
>>>> +static int get_acp63_device_config(u32 config, struct pci_dev *pci, struct acp63_dev_data *acp_data)
>>>>  {
>>>>  	struct acpi_device *dmic_dev;
>>>> +	struct acpi_device *sdw_dev;
>>>>  	const union acpi_object *obj;
>>>>  	bool is_dmic_dev = false;
>>> useless init
>> We are checking is_dmic_dev & is_sdw_dev flags in same code.
>> Either we need to explicitly update value as false when no ACP PDM
>> /SoundWire manager instances not found.
> please discard my comment, I read this sideways
>
>>>> +	bool is_sdw_dev = false;
>>> and useless init as well...
> same here.
>>>> +	int ret;
>>>>  
>>>>  	dmic_dev = acpi_find_child_device(ACPI_COMPANION(&pci->dev), ACP63_DMIC_ADDR, 0);
>>>>  	if (dmic_dev) {
>>>> +		/* is_dmic_dev flag will be set when ACP PDM controller device exists */
>>>>  		if (!acpi_dev_get_property(dmic_dev, "acp-audio-device-type",
>>>>  					   ACPI_TYPE_INTEGER, &obj) &&
>>>>  					   obj->integer.value == ACP_DMIC_DEV)
>>>>  			is_dmic_dev = true;
>>>>  	}
>>>>  
>>>> +	sdw_dev = acpi_find_child_device(ACPI_COMPANION(&pci->dev), ACP63_SDW_ADDR, 0);
>>>> +	if (sdw_dev) {
>>>> +		acp_data->sdw_fw_node = acpi_fwnode_handle(sdw_dev);
>>>> +		ret = sdw_amd_scan_controller(&pci->dev);
>>>> +		/* is_sdw_dev flag will be set when SoundWire Manager device exists */
>>>> +		if (!ret)
>>>> +			is_sdw_dev = true;
>>> sdw_amd_scan_controller() can return -EINVAL, how is this handled?
>>> Shouldn't you stop execution and return here in the < 0 case?
>> As per our design, ACP PCI driver probe should be successful, even
>> there are no ACP PDM or Soundwire Manager instance configuration
>> related platform devices.
>>
>> The ACP PCI driver is multi-use and that even if SoundWire manager
>> instances or PDM controller is not found, it will still be used to set the
>> hardware to proper low power states. i.e ACP should enter D3 state
>> after successful execution of probe sequence.
> Ah ok, maybe a reworded comment would make sense then, e.g.
>
> "continue probe and discard errors if SoundWire Manager is not described
> in ACPI tables"
>
> Same for DMIC above
will add a comment.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ