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] [day] [month] [year] [list]
Date:   Tue, 18 Dec 2018 11:49:50 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:     Raju Lakkaraju <Raju.Lakkaraju@...rochip.com>,
        netdev@...r.kernel.org
Cc:     f.fainelli@...il.com, andrew@...n.ch, UNGLinuxDriver@...rochip.com
Subject: Re: [PATCH net-next] net: phy: mscc: Fix the VSC 8530/31/40/41 Chips
 Init sequence

Hello!

On 18.12.2018 8:43, Raju Lakkaraju wrote:

> From: Raju Lakkaraju <Raju.Lakkaraju@...rochip.com>
> 
> Fix the VSC 8530/31/40/41 Chips Init sequence
> - Turn on Broadcast writes
> - UNH 1.8.1 clear bias for UNH 1000BT distortion
> - UNH 1.8.7 optimize pre-emphasis for 100BasTx UNH 100W fix
> - Enable Token-ring during 'Coma Mode'
> 
> Signed-off-by: Raju Lakkaraju <Raju.Lakkaraju@...rochip.com>
> ---
>   drivers/net/phy/mscc.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++-
>   1 file changed, 53 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/phy/mscc.c b/drivers/net/phy/mscc.c
> index cfe680f..766d64e 100644
> --- a/drivers/net/phy/mscc.c
> +++ b/drivers/net/phy/mscc.c
[...]
> @@ -1650,7 +1695,7 @@ static int vsc8584_config_init(struct phy_device *phydev)
>   
>   static int vsc85xx_config_init(struct phy_device *phydev)
>   {
> -	int rc, i;
> +	int rc, i, phy_id;
>   	struct vsc8531_private *vsc8531 = phydev->priv;
>   
>   	rc = vsc85xx_default_config(phydev);
> @@ -1665,6 +1710,13 @@ static int vsc85xx_config_init(struct phy_device *phydev)
>   	if (rc)
>   		return rc;
>   
> +	phy_id = phydev->drv->phy_id & phydev->drv->phy_id_mask;
> +	if (PHY_ID_VSC8531 == phy_id || PHY_ID_VSC8541 == phy_id ||
> +	    PHY_ID_VSC8530 == phy_id || PHY_ID_VSC8540 == phy_id)

   This is asking for *switch*. And the immediates should be on the right side 
of ==, anyway.

> +		rc = vsc8531_pre_init_seq_set(phydev);
> +		if (rc)
> +			return rc;
> +
>   	rc = vsc85xx_eee_init_seq_set(phydev);
>   	if (rc)
>   		return rc;

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ