From: Murali Karicheri <m-karicheri2@ti.com>
To: <davem@davemloft.net>, <arnd@arndb.de>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <mugunthanvnm@ti.com>,
<linux-omap@vger.kernel.org>, <grygorii.strashko@ti.com>
Subject: [net-next v1 4/8] net: netcp: ethss: get phy-handle only if link interface is MAC-to-PHY
Date: Fri, 6 Jan 2017 15:37:42 -0500 [thread overview]
Message-ID: <1483735066-14632-5-git-send-email-m-karicheri2@ti.com> (raw)
In-Reply-To: <1483735066-14632-1-git-send-email-m-karicheri2@ti.com>
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@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.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 7d9e36f..4a64b3e 100644
--- a/drivers/net/ethernet/ti/netcp_ethss.c
+++ b/drivers/net/ethernet/ti/netcp_ethss.c
@@ -2930,7 +2930,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
next prev parent reply other threads:[~2017-01-06 20:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-06 20:37 [net-next v1 0/8] netcp: enhancements and minor fixes Murali Karicheri
2017-01-06 20:37 ` [net-next v1 1/8] net: netcp: extract eflag from desc for rx_hook handling Murali Karicheri
2017-01-06 20:37 ` [net-next v1 2/8] net: netcp: remove the redundant memmov() Murali Karicheri
2017-01-06 20:37 ` [net-next v1 3/8] net: netcp: store network statistics in 64 bits Murali Karicheri
2017-01-06 20:37 ` Murali Karicheri [this message]
2017-01-06 20:37 ` [net-next v1 5/8] net: netcp: use hw capability to remove FCS word from rx packets Murali Karicheri
2017-01-06 20:37 ` [net-next v1 6/8] net: netcp: ale: update to support unknown vlan controls for NU switch Murali Karicheri
2017-01-06 20:37 ` [net-next v1 7/8] net: netcp: ale: use ale_status to size the ale table Murali Karicheri
2017-01-06 20:37 ` [net-next v1 8/8] net: netcp: ale: add proper ale entry mask bits for netcp switch ALE Murali Karicheri
2017-01-08 2:04 ` [net-next v1 0/8] netcp: enhancements and minor fixes David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1483735066-14632-5-git-send-email-m-karicheri2@ti.com \
--to=m-karicheri2@ti.com \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=grygorii.strashko@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=mugunthanvnm@ti.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).