回覆: 回覆: [net-next 3/3] net: ftgmac100: Support for AST2700

From: Jacky Chou
Date: Thu Nov 14 2024 - 01:27:13 EST


Hi Andrew,


> > > > - map = le32_to_cpu(rxdes->rxdes3);
> > > > + map = le32_to_cpu(rxdes->rxdes3) | ((rxdes->rxdes2 &
> > > > +FTGMAC100_RXDES2_RXBUF_BADR_HI) << 16);
> > >
> > > Is this safe? You have to assume older generation of devices will
> > > return 42 in rxdes3, since it is not used by the hardware.
> >
> > Why does it need to return 42 in rxdes3?
> > The packet buffer address of the RX descriptor is used in both software and
> hardware.
>
> 42 is just a random value. The point is, what do older generation of devices
> return here? Some random value? Something well defined?
>
> You basically need to convince us that you are not breaking older systems by
> accessing registers which they do not have. Describe in the commit message
> how you know this is safe, what testing you have done etc.

Thanks for your kind reminder.
I will commit more detail information in next version.

Thanks,
Jacky