net: dsa: microchip: prepare PHY for proper advertisement

Prepare PHY for proper advertisement as sometimes the PHY in the switch
has its own problems even though it may share the PHY id from regular PHY
but the fixes in the PHY driver do not apply.

Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Tristram Ha
2019-02-22 16:36:47 -08:00
committed by David S. Miller
parent 84f2926455
commit 42fc6a4c61
3 changed files with 17 additions and 3 deletions

View File

@@ -2,7 +2,7 @@
/*
* Microchip switch driver main logic
*
* Copyright (C) 2017-2018 Microchip Technology Inc.
* Copyright (C) 2017-2019 Microchip Technology Inc.
*/
#include <linux/delay.h>
@@ -238,6 +238,7 @@ int ksz_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy)
/* setup slave port */
dev->dev_ops->port_setup(dev, port, false);
dev->dev_ops->phy_setup(dev, port, phy);
/* port_stp_state_set() will be called after to enable the port so
* there is no need to do anything.