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: <5955cbf1-f16c-4a37-af6e-726f9519e6b1@gmail.com>
Date:   Wed, 18 Dec 2019 12:11:50 -0800
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Michael Grzeschik <m.grzeschik@...gutronix.de>, andrew@...n.ch
Cc:     netdev@...r.kernel.org, davem@...emloft.net, kernel@...gutronix.de
Subject: Re: [PATCH v2 1/4] micrel: fix config_aneg for ksz886x

On 12/18/19 12:08 PM, Michael Grzeschik wrote:
> The third port of the ksz886x is fixed to be connected to the
> cpu. This port has no possibility to do auto negotiation.

Then this may not the PHY driver you would want to use, but rather use a
fixed-link which would use the Generic PHY driver and take care of
setting the appropriate speed/duplex/pause settings the way you defined
them in Device Tree.

> 
> Signed-off-by: Michael Grzeschik <m.grzeschik@...gutronix.de>
> ---
>  drivers/net/phy/micrel.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
> index 63dedec0433de..913a8b68da350 100644
> --- a/drivers/net/phy/micrel.c
> +++ b/drivers/net/phy/micrel.c
> @@ -841,6 +841,16 @@ static int ksz8873mll_config_aneg(struct phy_device *phydev)
>  	return 0;
>  }
>  
> +static int ksz886x_config_aneg(struct phy_device *phydev)
> +{
> +	if (phydev->mdio.addr == 3) {
> +		phydev->autoneg = AUTONEG_DISABLE;
> +		genphy_read_status(phydev);
> +	}
> +
> +	return genphy_config_aneg(phydev);
> +}
> +
>  static int kszphy_get_sset_count(struct phy_device *phydev)
>  {
>  	return ARRAY_SIZE(kszphy_hw_stats);
> @@ -1171,6 +1181,7 @@ static struct phy_driver ksphy_driver[] = {
>  	.name		= "Micrel KSZ886X Switch",
>  	/* PHY_BASIC_FEATURES */
>  	.config_init	= kszphy_config_init,
> +	.config_aneg	= ksz886x_config_aneg,
>  	.suspend	= genphy_suspend,
>  	.resume		= genphy_resume,
>  }, {
> 


-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ