Hi Andrew Lunn, Thanks for the feedback. > Subject: Re: [PATCH/RFC 2/2] ravb: Add GbEthernet driver support > > On Wed, Jul 14, 2021 at 05:01:34PM +0000, Biju Das wrote: > > Hi Andrew Lunn, > > > > Thanks for the feedback. > > > > > Subject: Re: [PATCH/RFC 2/2] ravb: Add GbEthernet driver support > > > > > > > + if (priv->phy_interface == PHY_INTERFACE_MODE_RGMII_ID) { > > > > + ravb_write(ndev, ravb_read(ndev, CXR31) > > > > + | CXR31_SEL_LINK0, CXR31); > > > > + } else { > > > > + ravb_write(ndev, ravb_read(ndev, CXR31) > > > > + & ~CXR31_SEL_LINK0, CXR31); > > > > + } > > > > > > You need to be very careful here. What value is passed to the PHY? > > > > PHY_INTERFACE_MODE_RGMII is the value passed to PHY. > > In all four cases? So if DT contains rgmii-txid, or rgmii-rxid, the > requested delay will not happen in either the MAC or the PHY? OK, it is my mistake. I specified "rgmii" in DT. Without phy delays (rx and tx) ethernet won't work. Will fix it as "rgmii-id" in dt. The above register(In-band Status set register) is basically used for selecting the link. > > In general in Linux, MAC drivers don't add any delays, and request the PHY > to do it. There are some MAC drivers which do it differently, they add the > delays, but that is uncommon. So unless you have a good reason not to, i > would suggest you leave the PHY to do the delays. OK. Regards, Biju