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: <c6e36569-e3a8-4962-ac85-2fd7d35ab5d1@lunn.ch>
Date: Wed, 11 Sep 2024 19:26:23 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Raju Lakkaraju <Raju.Lakkaraju@...rochip.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com, bryan.whitehead@...rochip.com,
	UNGLinuxDriver@...rochip.com, linux@...linux.org.uk,
	maxime.chevallier@...tlin.com, rdunlap@...radead.org,
	Steen.Hegelund@...rochip.com, daniel.machon@...rochip.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next V2 4/5] net: lan743x: Implement phylink pcs

> +static int pci11x1x_pcs_read(struct mii_bus *bus, int addr, int devnum,
> +			     int regnum)
> +{
> +	struct lan743x_adapter *adapter = bus->priv;
> +
> +	if (addr)
> +		return -EOPNOTSUPP;
> +
> +	return lan743x_sgmii_read(adapter, devnum, regnum);
> +}

>  static int lan743x_mdiobus_init(struct lan743x_adapter *adapter)
>  {
> +	struct dw_xpcs *xpcs;
>  	u32 sgmii_ctl;
>  	int ret;
>  
> @@ -3783,8 +3823,17 @@ static int lan743x_mdiobus_init(struct lan743x_adapter *adapter)
>  				  "SGMII operation\n");
>  			adapter->mdiobus->read = lan743x_mdiobus_read_c22;
>  			adapter->mdiobus->write = lan743x_mdiobus_write_c22;
> -			adapter->mdiobus->read_c45 = lan743x_mdiobus_read_c45;
> -			adapter->mdiobus->write_c45 = lan743x_mdiobus_write_c45;
> +			if (adapter->is_sfp_support_en) {
> +				adapter->mdiobus->read_c45 =
> +					pci11x1x_pcs_read;
> +				adapter->mdiobus->write_c45 =
> +					pci11x1x_pcs_write;

As you can see, the naming convention is to put the bus transaction
type on the end. So please name these pci11x1x_pcs_read_c45...

Also, am i reading this correct. C22 transfers will go out a
completely different bus to C45 transfers when there is an SFP?

If there are two physical MDIO busses, please instantiate two Linux
MDIO busses.

    Andrew

---
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ