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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 12 May 2020 11:08:37 -0500
From:   Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To:     Vinod Koul <vkoul@...nel.org>
Cc:     alsa-devel@...a-project.org, tiwai@...e.de,
        gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
        ranjani.sridharan@...ux.intel.com, hui.wang@...onical.com,
        broonie@...nel.org, srinivas.kandagatla@...aro.org,
        jank@...ence.com, mengdong.lin@...el.com,
        slawomir.blauciak@...el.com, sanyog.r.kale@...el.com,
        Bard Liao <yung-chuan.liao@...ux.intel.com>,
        rander.wang@...ux.intel.com, bard.liao@...el.com
Subject: Re: [PATCH 3/3] soundwire: bus_type: add sdw_master_device support



On 5/12/20 10:59 AM, Vinod Koul wrote:
> On 12-05-20, 09:36, Pierre-Louis Bossart wrote:
>> On 5/11/20 10:30 PM, Vinod Koul wrote:
>>> On 11-05-20, 14:00, Pierre-Louis Bossart wrote:
>>>>>> +	md = &bus->md;
>>>>>> +	md->dev.bus = &sdw_bus_type;
>>>>>> +	md->dev.type = &sdw_master_type;
>>>>>> +	md->dev.parent = parent;
>>>>>> +	md->dev.of_node = parent->of_node;
>>>>>> +	md->dev.fwnode = fwnode;
>>>>>> +	md->dev.dma_mask = parent->dma_mask;
>>>>>> +
>>>>>> +	dev_set_name(&md->dev, "sdw-master-%d", bus->link_id);
>>>>>
>>>>> This give nice sdw-master-0. In DT this comes from reg property. I dont
>>>>> seem to recall if the ACPI/Disco spec treats link_id as unique across
>>>>> the system, can you check that please, if not we would need to update
>>>>> this.
>>>> Table 3 in the Disco for Soundwire 1.0 spec: "all LinkID values are relative
>>>> to the immediate parent Device."
>>>>
>>>> There isn't any known implementation with more than one controller.
>>>
>>> But then it can come in "future" right. So lets try to make it future
>>> proof by not using the link_id (we can expose that as a sysfs if people
>>> want to know). So a global unique id needs to allocated (hint: idr or
>>> equivalent) and used as master_id
>>
>> Can you clarify if you are asking for a global ID for Intel/ACPI platforms,
>> or for DT as well? I can't figure out from the soundwire-controller.yaml
>> definitions if there is already a notion of unique ID.
> 
> If ACPI was unique, then I was planning to update the definition below
> to include that. Given that it is not the case, let's make it agnostic to
> underlying firmware.

I am not sure I understand how this would be done.

The call sequence is

sdw_bus_master_add(bus)
     sdw_master_device_add(bus, parent, fw_node)

At the bus level, we don't have any information on which controller the 
bus is related to.

We'd need to add an argument to sdw_bus_master_add() and have the 
controller unique ID be allocated outside of the SoundWire core, hence 
my question on whether the DT definition should not be extended.

> 
>>
>> properties:
>>    $nodename:
>>      pattern: "^soundwire(@.*)?$"
>>
>>     soundwire@...0000 {
>>          #address-cells = <2>;
>>          #size-cells = <0>;
>>          reg = <0x0c2d0000 0x2000>;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ