[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1482271793-7671-7-git-send-email-m-karicheri2@ti.com>
Date: Tue, 20 Dec 2016 17:09:49 -0500
From: Murali Karicheri <m-karicheri2@...com>
To: <netdev@...r.kernel.org>, <linux-omap@...r.kernel.org>,
<grygorii.strashko@...com>, <mugunthanvnm@...com>,
<linux-kernel@...r.kernel.org>, <arnd@...db.de>,
<davem@...emloft.net>, <devicetree@...r.kernel.org>,
<mark.rutland@....com>, <robh+dt@...nel.org>
Subject: [PATCH net-next 06/10] net: netcp: ethss: get phy-handle only if link interface is MAC-to-PHY
Currently to parse phy-handle, driver doesn't check if the interface is
MAC to PHY. This patch add this check for all MAC to PHY interface types
supported by the driver.
Signed-off-by: Murali Karicheri <m-karicheri2@...com>
Signed-off-by: Sekhar Nori <nsekhar@...com>
---
drivers/net/ethernet/ti/netcp_ethss.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ti/netcp_ethss.c b/drivers/net/ethernet/ti/netcp_ethss.c
index cb48f88..9266961 100644
--- a/drivers/net/ethernet/ti/netcp_ethss.c
+++ b/drivers/net/ethernet/ti/netcp_ethss.c
@@ -2956,7 +2956,9 @@ static int init_slave(struct gbe_priv *gbe_dev, struct gbe_slave *slave,
}
slave->open = false;
- slave->phy_node = of_parse_phandle(node, "phy-handle", 0);
+ if ((slave->link_interface == SGMII_LINK_MAC_PHY) ||
+ (slave->link_interface == XGMII_LINK_MAC_PHY))
+ slave->phy_node = of_parse_phandle(node, "phy-handle", 0);
slave->port_num = gbe_get_slave_port(gbe_dev, slave->slave_num);
if (slave->link_interface >= XGMII_LINK_MAC_PHY)
--
1.9.1
Powered by blists - more mailing lists