RE: [PATCH net-next v8 10/11] onsemi: s2500: Add driver support for S2500 MAC-PHY
From: Selvamani Rajagopal
Date: Wed Oct 07 2026 - 14:33:58 EST
> -----Original Message-----
> From: Andrew Lunn <andrew@xxxxxxx>
> Sent: Tuesday, October 6, 2026 6:54 AM
> Subject: Re: [PATCH net-next v8 10/11] onsemi: s2500: Add driver support for S2500 MAC-PHY
>
>
>
> > + /* RX bytes is a 64-bit value that is stored in two regs */
> > + *(data++) += ((u64)*rptr) | (((u64)*(rptr + 1)) << 32);
>
> Is it guaranteed by the hardware these two words are read atomically?
Yes. When OCTETSRXL (lower 32 bits) register is read, OCTETSRXLH (higher bits) are sampled and stored in the register.
> > +{
> > + u32 addr;
> > + u32 data[2];
>
> Reverse christmas tree.
Sorry about the slip. Fixing it.
>
> Andrew