From patchwork Fri Jan 6 20:37:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Murali Karicheri X-Patchwork-Id: 90222 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp9613314qgi; Fri, 6 Jan 2017 12:38:05 -0800 (PST) X-Received: by 10.98.93.201 with SMTP id n70mr73045194pfj.161.1483735085616; Fri, 06 Jan 2017 12:38:05 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s2si80582950pfb.210.2017.01.06.12.38.05; Fri, 06 Jan 2017 12:38:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031631AbdAFUh5 (ORCPT + 4 others); Fri, 6 Jan 2017 15:37:57 -0500 Received: from lelnx193.ext.ti.com ([198.47.27.77]:11786 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760466AbdAFUhw (ORCPT ); Fri, 6 Jan 2017 15:37:52 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id v06KbmwD025448; Fri, 6 Jan 2017 14:37:48 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v06KbmKH016733; Fri, 6 Jan 2017 14:37:48 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.294.0; Fri, 6 Jan 2017 14:37:48 -0600 Received: from ula0868495.am.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v06KbjFs003410; Fri, 6 Jan 2017 14:37:47 -0600 From: Murali Karicheri To: , , , , , , 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 Message-ID: <1483735066-14632-5-git-send-email-m-karicheri2@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1483735066-14632-1-git-send-email-m-karicheri2@ti.com> References: <1483735066-14632-1-git-send-email-m-karicheri2@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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 Signed-off-by: Sekhar Nori --- drivers/net/ethernet/ti/netcp_ethss.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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)