RE: [LINUX PATCH] net: axienet: Fix axiethernet register description

From: Pandey, Radhey Shyam
Date: Wed Jul 31 2024 - 11:47:32 EST


> -----Original Message-----
> From: Pandey, Radhey Shyam <radhey.shyam.pandey@xxxxxxx>
> Sent: Wednesday, July 17, 2024 1:11 AM
> To: Andrew Lunn <andrew@xxxxxxx>; Gupta, Suraj
> <Suraj.Gupta2@xxxxxxx>
> Cc: davem@xxxxxxxxxxxxx; edumazet@xxxxxxxxxx; kuba@xxxxxxxxxx;
> pabeni@xxxxxxxxxx; Simek, Michal <michal.simek@xxxxxxx>;
> netdev@xxxxxxxxxxxxxxx; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; git (AMD-Xilinx) <git@xxxxxxx>; Katakam, Harini
> <harini.katakam@xxxxxxx>
> Subject: RE: [LINUX PATCH] net: axienet: Fix axiethernet register description
>
> > -----Original Message-----
> > From: Andrew Lunn <andrew@xxxxxxx>
> > Sent: Saturday, July 13, 2024 8:25 PM
> > To: Gupta, Suraj <Suraj.Gupta2@xxxxxxx>
> > Cc: Pandey, Radhey Shyam <radhey.shyam.pandey@xxxxxxx>;
> > davem@xxxxxxxxxxxxx; edumazet@xxxxxxxxxx; kuba@xxxxxxxxxx;
> > pabeni@xxxxxxxxxx; Simek, Michal <michal.simek@xxxxxxx>;
> > netdev@xxxxxxxxxxxxxxx; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx; linux-
> > kernel@xxxxxxxxxxxxxxx; git (AMD-Xilinx) <git@xxxxxxx>; Katakam, Harini
> > <harini.katakam@xxxxxxx>
> > Subject: Re: [LINUX PATCH] net: axienet: Fix axiethernet register description
> >
> > On Sat, Jul 13, 2024 at 06:48:07PM +0530, Suraj Gupta wrote:
> > > Rename axiethernet register description to be inline with product guide
> > > register names. It also removes obsolete registers and bitmasks. There is
> > > no functional impact since the modified offsets are only renamed.
> > >
> > > Rename XAE_PHYC_OFFSET->XAE_RMFC_OFFSET (Only used in ethtool
> > get_regs)
> > > XAE_MDIO_* : update documentation comment.
> > > Remove unused Bit masks for Axi Ethernet PHYC register.
> > > Remove bit masks for MDIO interface MIS, MIP, MIE, MIC registers.
> > > Rename XAE_FMI -> XAE_FMC.
> >
> > Might be too way out there, but why not modify the documentation to
> > fit Linux? This driver is likely to get bug fixes, and renames like
>
> The problem is documentation is common for other software stacks as well
> like baremetal/RTOS.
>
> Considering this i feel better to correct the names and align with IP register
> description else someone reading code may think this reg is related to
> some other configurations.
>
> Example: XAE_PHYC_OFFSET is corrected/renamed to XAE_RMFC_OFFSET.
> RX Max Frame Configuration 0x00000414 R/W
> XAE_RMFC_OFFSET is only used in ethtool get_regs.
>

Andrew: I am thinking to split this patch into two and send out v2.
1) Fix axiethernet register description (XAE_PHYC_OFFSET->XAE_RMFC_OFFSET,
XAE_FMI -> XAE_FMC)

2) Remove unused bitmasks , register offsets.

Please let me know if you have any other thoughts.

> Other changes are removing unused bits masks (Remove unused Bit masks
> for
> Axi Ethernet PHYC register, Remove bit masks for MDIO interface MIS, MIP,
> MIE, MIC registers) so should be fine to remove the dead code.
>
> Thanks.
> > this make it harder to backport those fixes. Documentation on the
> > other hand just tends to get erratas, either in a separate document,
> > or appended to the beginning/end. There is no applying patches to
> > documentation.
> >
> > Andrew