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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 14 Feb 2017 18:43:06 -0500
From:   Christopher Covington <cov@...eaurora.org>
To:     Timur Tabi <timur@...eaurora.org>,
        Jonathan Corbet <corbet@....net>,
        Marc Zyngier <marc.zyngier@....com>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will.deacon@....com>, linux-doc@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        Mark Rutland <mark.rutland@....com>,
        linux-kernel@...r.kernel.org, shankerd@...eaurora.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.com>,
        Russell King <linux@...linux.org.uk>,
        linux-serial@...r.kernel.org
Cc:     Mark Langsdorf <mlangsdo@...hat.com>,
        Mark Salter <msalter@...hat.com>, Jon Masters <jcm@...hat.com>,
        Neil Leeder <nleeder@...eaurora.org>
Subject: Re: [PATCH 1/2] tty: pl011: Work around QDF2400 E44 stuck BUSY bit

On 02/08/2017 06:04 PM, Timur Tabi wrote:
> On 02/08/2017 04:22 PM, Christopher Covington wrote:
>>>> >> -    while (pl011_read(uap, REG_FR) & uap->vendor->fr_busy)
>>>> >> +    while ((pl011_read(uap, REG_FR) ^ uap->vendor->inv_fr)
>>>> >> +                        & uap->vendor->fr_busy)
>>> >
>>> > I really think the XOR logic needs to be documented wherever it's
>>> > used. It's just too confusing.
>> References such as the following for basic bit operations like
>> setting, clearing, and toggling are easy enough to come by.
>>
>> http://stackoverflow.com/questions/47981/how-do-you-set-clear-and-toggle-a-single-bit-in-c-c
> 
> I know what XOR does. I was thinking a more high-level comment would
> be appropriate. With E44, we want to ignore the BUSY bit and use TXFE
> instead. So was hoping to a comment that says that:
> 
> /* Normally, we poll until BUSY=0, but E44 says we should poll until
> TXFE=1 instead. So with E44, we set fr_busy to TXFE, but we have to
> invert it. */

Oh, yeah, that'd be good. I'll include better comments in v2.

Cheers,
Cov

-- 
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code
Aurora Forum, a Linux Foundation Collaborative Project.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ