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]
Message-ID: <4492b71e-9923-365c-f22c-3766e2d5bae2@linux.intel.com>
Date:   Thu, 19 Dec 2019 14:05:48 -0600
From:   Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        broonie@...nel.org, lee.jones@...aro.org, linus.walleij@...aro.org
Cc:     robh@...nel.org, alsa-devel@...a-project.org,
        bgoswami@...eaurora.org, vinod.koul@...aro.org,
        devicetree@...r.kernel.org, spapothi@...eaurora.org,
        linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org
Subject: Re: [alsa-devel] [PATCH v6 02/11] mfd: wcd934x: add support to
 wcd9340/wcd9341 codec



>> It was my understanding that in SLIMbus the Linux devices are created 
>> at probe time, and when the device reports present this 
>> 'device_status' callback is used to notify the codec driver of a 
>> change. The rationale for this was that the codec driver may control 
>> power switches/gpios that are necessary for the device to appear on 
>> the bus.
> 
> We use same rational here to power switch and flip reset pins in device 
> probe to power up the actual SLIMBus device in device probe.
> 
> Only difference here is that the actual SLIMBus device itself is 
> represented as many child devices based on there functionality.
> 
> SLIMBus parent device in this case is MFD device which is created at 
> probe time. However child devices for that device like gpio controller, 
> codec, clock controller and soundwire controller are created only after 
> the device is enumerated on the bus. Before that none of these devices 
> will be in a position to talk on the bus.
> 
> 
>>
>> This argument was used to require an change in the SoundWire 
>> implementation, so we followed this model of creating devices at probe 
>> time based on information reported by ACPI/DT, and used the 
>> 'update_status' callback when the device is present on the bus (which 
>> may happen after a delay or controlled by an external power switch). 
>> This approach can lead to 'ghost devices' described in firmware but 
>> not populated in hardware, and power management opens on how long a 
>> bus needs to remain active if no devices report present.
>>
>> What I understand from the code above is that the devices are actually 
>> created when the SLIMbus device reports PRESENT, which seems a 180 
>> degree change in directions?
>>
> Note these are the child devices of the MFD SLIMBus device.

Ah ok. I guess the creation of those child devices when the parent 
SLIMbus device reports PRESENT initially if fine, it's the part where 
you remove them if the device loses sync or gets powered off which is 
odd. And I guess technically you could still have race conditions where 
a child device starts a transaction just as the parent is no longer 
attached to the bus.

>> I would however not remove the devices when the status is down but 
>> only on an explicit .remove.
> 
> Am open for suggestions but I would not like the child devices to talk 
> on the bus once the SLIMbus device is down! Only way to ensure or make 
> it silent is to remove.

it's as if you are missing a mechanism to forward the parent status to 
the children so use remove() for lack of a better solution?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ