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]
Message-ID: <20171127105513.GU3187@localhost>
Date:   Mon, 27 Nov 2017 16:25:13 +0530
From:   Vinod Koul <vinod.koul@...el.com>
To:     Charles Keepax <ckeepax@...nsource.cirrus.com>
Cc:     ALSA <alsa-devel@...a-project.org>,
        Sudheer Papothi <spapothi@...eaurora.org>,
        Takashi <tiwai@...e.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        plai@...eaurora.org, LKML <linux-kernel@...r.kernel.org>,
        Pierre <pierre-louis.bossart@...ux.intel.com>,
        patches.audio@...el.com, Mark <broonie@...nel.org>,
        srinivas.kandagatla@...aro.org, Shreyas NC <shreyas.nc@...el.com>,
        Sanyog Kale <sanyog.r.kale@...el.com>,
        Sagar Dharia <sdharia@...eaurora.org>, alan@...ux.intel.com
Subject: Re: [alsa-devel] [PATCH v2 04/14] soundwire: Add MIPI DisCo property
 helpers

On Mon, Nov 27, 2017 at 09:56:24AM +0000, Charles Keepax wrote:
> On Mon, Nov 27, 2017 at 02:48:50PM +0530, Vinod Koul wrote:
> > On Mon, Nov 27, 2017 at 07:59:40AM +0000, Charles Keepax wrote:
> > 
> > > > > Apologies for the long and slightly vague comment, but I guess my
> > > > > question is do you have a thought on how drivers should know when
> > > > > it is safe to communicate with a SoundWire device?
> > > > 
> > > > IMO it is safe to communicate with SoundWire device when the Slave
> > > > status is ATTACHED. In any case bus will report error if it is not able
> > > > to communicate with SoundWire device.
> > > 
> > > Yeah I guess my point here is that there is currently no way in
> > > this SoundWire framework for the slave driver to know if the
> > > device is attached or not, unless I am missing something?  There
> > > are calls by which the master can inform the framework, but
> > > nothing to pass that on to the slave driver.
> > 
> > Nope, as Sanyog pointed out there are deterministic ways for Slave
> > driver to find out. We can do that by:
> >  a) check the slave->status and communicate only if status is SDW_SLAVE_ATTACHED
> >  b) Implement sdw_slave_ops->update_status() which is invoked by Bus on any
> >     status changes.
> > 
> > So to summarize, for a Slave driver during the probe, if the status is not
> > SDW_SLAVE_ATTACHED it should not communicate and should implement
> > sdw_slave_ops->update_status and attempt IO when this callback gets invoked
> > with SDW_SLAVE_ATTACHED status.
> > 
> > Does that clarify and solve the problem.
> 
> Ok apologies looks like this was my bad sorry for missing those.

Ah no need for apologies Charles. The whole point of the patch review is to
make sure everyone is on same page wrt understanding and that is the beauty
of review over email where we can discuss and clarfiy :)

> That does indeed seem fine.

Great !!!

-- 
~Vinod

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ