Hello!

On 18.12.2018 8:43, Raju Lakkaraju wrote:

From: Raju Lakkaraju <raju.lakkar...@microchip.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.lakkar...@microchip.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

Reply via email to