lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <PAXPR04MB8510E844BB7640F4A06C9AC3887E2@PAXPR04MB8510.eurprd04.prod.outlook.com>
Date: Tue, 8 Oct 2024 09:43:04 +0000
From: Wei Fang <wei.fang@....com>
To: Russell King <linux@...linux.org.uk>
CC: "davem@...emloft.net" <davem@...emloft.net>, "edumazet@...gle.com"
	<edumazet@...gle.com>, "kuba@...nel.org" <kuba@...nel.org>,
	"pabeni@...hat.com" <pabeni@...hat.com>, "robh@...nel.org" <robh@...nel.org>,
	"krzk+dt@...nel.org" <krzk+dt@...nel.org>, "conor+dt@...nel.org"
	<conor+dt@...nel.org>, "andrew@...n.ch" <andrew@...n.ch>,
	"f.fainelli@...il.com" <f.fainelli@...il.com>, "hkallweit1@...il.com"
	<hkallweit1@...il.com>, "Andrei Botila (OSS)" <andrei.botila@....nxp.com>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>, "imx@...ts.linux.dev"
	<imx@...ts.linux.dev>
Subject: RE: [PATCH v2 net-next 2/2] net: phy: c45-tja11xx: add support for
 outputing RMII reference clock

> -----Original Message-----
> From: Russell King <linux@...linux.org.uk>
> Sent: 2024年10月8日 16:31
> To: Wei Fang <wei.fang@....com>
> Cc: davem@...emloft.net; edumazet@...gle.com; kuba@...nel.org;
> pabeni@...hat.com; robh@...nel.org; krzk+dt@...nel.org;
> conor+dt@...nel.org; andrew@...n.ch; f.fainelli@...il.com;
> hkallweit1@...il.com; Andrei Botila (OSS) <andrei.botila@....nxp.com>;
> devicetree@...r.kernel.org; linux-kernel@...r.kernel.org;
> netdev@...r.kernel.org; imx@...ts.linux.dev
> Subject: Re: [PATCH v2 net-next 2/2] net: phy: c45-tja11xx: add support for
> outputing RMII reference clock
> 
> On Tue, Oct 08, 2024 at 03:07:08PM +0800, Wei Fang wrote:
> > @@ -1561,8 +1565,13 @@ static int nxp_c45_set_phy_mode(struct
> phy_device *phydev)
> >  			phydev_err(phydev, "rmii mode not supported\n");
> >  			return -EINVAL;
> >  		}
> > -		phy_write_mmd(phydev, MDIO_MMD_VEND1,
> VEND1_MII_BASIC_CONFIG,
> > -			      MII_BASIC_CONFIG_RMII);
> > +
> > +		if (priv->flags & TJA11XX_REVERSE_MODE)
> > +			phy_write_mmd(phydev, MDIO_MMD_VEND1,
> VEND1_MII_BASIC_CONFIG,
> > +				      MII_BASIC_CONFIG_RMII |
> MII_BASIC_CONFIG_REV);
> > +		else
> > +			phy_write_mmd(phydev, MDIO_MMD_VEND1,
> VEND1_MII_BASIC_CONFIG,
> > +				      MII_BASIC_CONFIG_RMII);
> 
> Netdev has an 80 column limit, and this needs commenting because we have
> PHY_INTERFACE_MODE_REVRMII which could be confused with this (although
> I haven't checked.)
> 
> 		u16 basic_config;
> 		...
> 		basic_config = MII_BASIC_CONFIG_RMII;
> 
> 		/* This is not PHY_INTERFACE_MODE_REVRMII */
> 		if (priv->flags & TJA11XX_REVERSE_MODE)
> 			basic_config |= MII_BASIC_CONFIG_REV;
> 
> 		phy_write_mmd(phydev, MDIO_MMD_VEND1,
> VEND1_MII_BASIC_CONFIG,
> 			      basic_config);
> 
> is much nicer to read.
> 

Okay, I will refine the patch, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ