[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9896e220-8c39-422a-01b3-beda0fc5f355@denx.de>
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