Re: [PATCH net-next v8 10/11] onsemi: s2500: Add driver support for S2500 MAC-PHY
From: Andrew Lunn
Date: Wed Oct 07 2026 - 14:31:41 EST
On Wed, Oct 07, 2026 at 06:27:05PM +0000, Selvamani Rajagopal wrote:
>
> > -----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.
Great. Maybe add a comment saying this.
Andrew