[PATCH v1] net: designware: eqos: fix link speed configuration for speed < 1000

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Put phy_device_connect() after MAC/DMA reset, otherwise link speed
configuration will be zeroed by the MAC/DMA reset. By an accident zero
configuration equal to the speed 1000, so it was still working for many users.

Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
---
 drivers/net/designware_eqos.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/designware_eqos.c b/drivers/net/designware_eqos.c
index 6b372e4274..d93cccd634 100644
--- a/drivers/net/designware_eqos.c
+++ b/drivers/net/designware_eqos.c
@@ -390,11 +390,6 @@ static int eqos_start(struct eth_device *edev)
 	int ret;
 	int i;
 
-	ret = phy_device_connect(edev, &eqos->miibus, eqos->phy_addr,
-				 eqos->ops->adjust_link, 0, eqos->interface);
-	if (ret)
-		return ret;
-
 	setbits_le32(&eqos->dma_regs->mode, EQOS_DMA_MODE_SWR);
 
 	ret = readl_poll_timeout(&eqos->dma_regs->mode, mode_set,
@@ -405,6 +400,11 @@ static int eqos_start(struct eth_device *edev)
 		return ret;
 	}
 
+	ret = phy_device_connect(edev, &eqos->miibus, eqos->phy_addr,
+				 eqos->ops->adjust_link, 0, eqos->interface);
+	if (ret)
+		return ret;
+
 	/* Reset above clears MAC address */
 	eqos_set_ethaddr(edev, eqos->macaddr);
 
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux