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:   Fri, 26 Jul 2019 09:17:52 -0500
From:   Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To:     Cezary Rojewski <cezary.rojewski@...el.com>
Cc:     alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
        tiwai@...e.de, broonie@...nel.org, vkoul@...nel.org,
        gregkh@...uxfoundation.org, jank@...ence.com,
        srinivas.kandagatla@...aro.org, slawomir.blauciak@...el.com,
        Sanyog Kale <sanyog.r.kale@...el.com>
Subject: Re: [alsa-devel] [RFC PATCH 23/40] soundwire: stream: fix disable
 sequence



On 7/26/19 5:14 AM, Cezary Rojewski wrote:
> On 2019-07-26 01:40, Pierre-Louis Bossart wrote:
>> -    return do_bank_switch(stream);
>> +    ret = do_bank_switch(stream);
>> +    if (ret < 0) {
>> +        dev_err(bus->dev, "Bank switch failed: %d\n", ret);
>> +        return ret;
>> +    }
>> +
>> +    /* make sure alternate bank (previous current) is also disabled */
>> +    list_for_each_entry(m_rt, &stream->master_list, stream_node) {
>> +        bus = m_rt->bus;
>> +        /* Disable port(s) */
>> +        ret = sdw_enable_disable_ports(m_rt, false);
>> +        if (ret < 0) {
>> +            dev_err(bus->dev, "Disable port(s) failed: %d\n", ret);
>> +            return ret;
>> +        }
>> +    }
>> +
>> +    return 0;
>>   }
>>   /**
>>
> 
> While not directly connected to this commit, I see that you do:
> link_for_each_entry(m_rt, &stream->master_list, stream_node)
> 
> quite often in /stream.c code. Helpful macro would prove useful.

Yes, but the flip side is that people need to look at what the macro 
does to figure it out, while everyone knows what list_for_each_entry() 
means. Not sure about this one.
And on top of this we'll probably have to rework this code to have a 
background copy of the current bank in the alternate bank so it'd rather 
leave it simple for now.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ