linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: axienet: add of_phy_connect call for XAE_PHY_TYPE_MII case
@ 2017-06-30  9:25 Alvaro Gamez Machado
  2017-06-30 17:30 ` Florian Fainelli
  0 siblings, 1 reply; 8+ messages in thread
From: Alvaro Gamez Machado @ 2017-06-30  9:25 UTC (permalink / raw)
  To: Anirudha Sarangi, John Linn, Michal Simek, Sören Brinkmann,
	netdev, linux-kernel
  Cc: Alvaro Gamez Machado

This IP core has support for mii connectivity to the phy, so be ready to
connect to it when this is the case.

Signed-off-by: Alvaro Gamez Machado <alvaro.gamez@hazent.com>
---
 drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
index 33c595f4691d..9b3f55449b5e 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -935,7 +935,11 @@ static int axienet_open(struct net_device *ndev)
 		return ret;
 
 	if (lp->phy_node) {
-		if (lp->phy_type == XAE_PHY_TYPE_GMII) {
+		if (lp->phy_type == XAE_PHY_TYPE_MII) {
+			phydev = of_phy_connect(lp->ndev, lp->phy_node,
+						axienet_adjust_link, 0,
+						PHY_INTERFACE_MODE_MII);
+		} else if (lp->phy_type == XAE_PHY_TYPE_GMII) {
 			phydev = of_phy_connect(lp->ndev, lp->phy_node,
 						axienet_adjust_link, 0,
 						PHY_INTERFACE_MODE_GMII);
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-07-05 15:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-30  9:25 [PATCH] net: axienet: add of_phy_connect call for XAE_PHY_TYPE_MII case Alvaro Gamez Machado
2017-06-30 17:30 ` Florian Fainelli
2017-07-02 10:19   ` Alvaro Gamez Machado
2017-07-04 16:24     ` Florian Fainelli
2017-07-05 10:13       ` Alvaro Gamez Machado
2017-07-05 14:34         ` Andrew Lunn
2017-07-05 14:43           ` Alvaro Gamez Machado
2017-07-05 15:20             ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).