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, 24 Mar 2020 13:34:05 +0100
From:   Marek Vasut <marex@...x.de>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     netdev@...r.kernel.org, "David S . Miller" <davem@...emloft.net>,
        Lukas Wunner <lukas@...ner.de>, Petr Stetiar <ynezz@...e.cz>,
        YueHaibing <yuehaibing@...wei.com>
Subject: Re: [PATCH 06/14] net: ks8851: Remove ks8851_rdreg32()

On 3/24/20 2:30 AM, Andrew Lunn wrote:
>> @@ -527,9 +507,8 @@ static void ks8851_rx_pkts(struct ks8851_net *ks)
>>  	 */
>>  
>>  	for (; rxfc != 0; rxfc--) {
>> -		rxh = ks8851_rdreg32(ks, KS_RXFHSR);
>> -		rxstat = rxh & 0xffff;
>> -		rxlen = (rxh >> 16) & 0xfff;
>> +		rxstat = ks8851_rdreg16(ks, KS_RXFHSR);
>> +		rxlen = ks8851_rdreg16(ks, KS_RXFHBCR) & RXFHBCR_CNT_MASK;
> 
> Hi Marek
> 
> Is there anything in the datasheet about these registers? Does reading
> them clear an interrupt etc? A 32bit read is i assume one SPI
> transaction, where as this is now two transactions, so no longer
> atomic.

Nope, they're just two registers holding packet metadata.
There are separate interrupt registers and separate register to clear
the packet from the RX FIFO, so reading these two registers does not
have to be atomic.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ