Re: [PATCH/RFC 2/2] ravb: Add GbEthernet driver support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

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.

	  Andrew




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux