Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1148834pxb; Tue, 17 Aug 2021 05:08:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzi2qYO9AHPggwFjg/19uYgzsWuLh656PzdoX1KViHjlqAakTwBJXlp3etphC2fwYS0MsUs X-Received: by 2002:aa7:c40a:: with SMTP id j10mr3704380edq.133.1629202107027; Tue, 17 Aug 2021 05:08:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629202107; cv=none; d=google.com; s=arc-20160816; b=LNPmIYfgI2yVMRdBJcQkEWjZbhwTfMgRiqaEQhdiUP2K0P1jSknT3bsXXk17tYp8lX W46FvkFq6EX2JaVaDK7dOe3fFavv6M3VuL+iSKGP6KetvitAp4CJtjty8hlO4krEERE9 Wrerr0mz0PsEDv6pXbISmm6QtTBNxakTpGLCCLW2vuHfkZYZMFh1WLjUikFahZLCGXok DuFnJuWJzns97isZ7KBKAvhIewjFfMW0NCswCf1OjSMw+qtuGjkm3pv036Lvpi4Yelmv VYivEE6MNmqSiyQxO0IseXWkfL5DuRx7EcndsTUvaJ//HN1h20nbVms+/1XFFzuLxmQd 05qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:ironport-sdr:dkim-signature; bh=3fsI4wPQW3n/cJrQwye+aGB3BskhwoSC9PCqr5ah1v0=; b=Q35E0g1Ml7N8dHjtC6m2OX1x5Jk2fvnSkuokZdysOizwdOBQPxoC9JJ2Ai0xdQZ59l 2DQDFS9duXkg4ogQ0XQPpD51sI6MzVKP4AIbA39ijHcQZNyW/aktuXOoK71CZDCpw8Eu 8Zl9Pd7vaIksDhSdaB6zks7LdmrRI6wq/Icr4ub82KvB4Wl3YLdglTpfh39JXsicFv2+ MhxSGkqx6miyYenDnMyT9zRcKXJ9M5fSjCnLh2sGXm+J7gL4CV8OAcafjVFfuj1i8Eu7 EaqgvOA416/rL6ZDP5w0Z55hiADP4Cb2DgbOrcer6H6PwKGmPA7IeDzf/cJlNNCPx4T1 c/rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=Hvpwb0I4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j17si2083482edw.349.2021.08.17.05.07.58; Tue, 17 Aug 2021 05:08:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=Hvpwb0I4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237014AbhHQMGr (ORCPT + 99 others); Tue, 17 Aug 2021 08:06:47 -0400 Received: from esa.microchip.iphmx.com ([68.232.153.233]:32569 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236933AbhHQMGq (ORCPT ); Tue, 17 Aug 2021 08:06:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1629201973; x=1660737973; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=d0YdxoDrvHVs1lNXuSmV62CWU56P5lJ/D3zPpVLGKDA=; b=Hvpwb0I41gYj95kzfe2hR7k2p+NinHPA391K/MRi2B0UePXSeUXsp3dB cjqQ23sMC3LBWyoHXRhUJdUv9adgiAa3RIiBn+HKaza+duqfjK3HeqwBI 31/gl8nOsajXjl8eKV7zovwD5YJjRFUADCrPmsyPHNXNWYEMdpTRkYE5E 9+cf8StlEFez9GkiIDzZLZUftX8mLygxACZrlibxHK+Hko5QeJJTgsiln 0IQW0asxZFXwCwhoYxazj6QIdxclgxz3A9EutS78CfkCUdVNZzYT1ONwP /QP2KA9bJMTn2vBdFLUdi27iX0hONvYPgdRDGMfT4BJN6APmSSaTtdp/G w==; IronPort-SDR: oKJO2zoMt4HoXCJf0DCWad569c/0unUIdapNcHUKCkXaJHQQK2iEVLHjPpcDoQqgkoW08XDMQB B5qT5LAilPZjjLwXP7BOrusMxKtN0iRwtNsM7fJbOjCo4uV86mmBZZkvOMoNwMM8FciCesK9jL TcPmTfCftm+LbcMyBWicIYkREGnYG70v88zpYZTbREGOsagJ3Pgw7WF85Enbbc7hK37nMqegCf 1Lbs3z0FUoYv8kMdcI20001FagKP38rZy+oizsnoRfSeyeKDqBt32cXK2umVvNezY6pli/TMq+ j+sVVUSp10ScbEGi4c9YryDW X-IronPort-AV: E=Sophos;i="5.84,328,1620716400"; d="scan'208";a="133092090" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 17 Aug 2021 05:06:12 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Tue, 17 Aug 2021 05:06:12 -0700 Received: from soft-dev3-1.microsemi.net (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Tue, 17 Aug 2021 05:06:10 -0700 From: Horatiu Vultur To: , , , , , , , CC: Horatiu Vultur Subject: [PATCH net-next] net: mscc: ocelot: Fix probe for vsc7514 Date: Tue, 17 Aug 2021 14:06:33 +0200 Message-ID: <20210817120633.404790-1-horatiu.vultur@microchip.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The check for parsing the 'phy-handle' was removed in the blamed commit. Therefor it would try to create phylinks for each port and connect to the phys. But on ocelot_pcb123 and ocelot_pcb120 not all the ports have a phy, so this will failed. So the probe of the network driver will fail. The fix consists in adding back the check for 'phy-handle' for vsc7514 Fixes: e6e12df625f2 ("net: mscc: ocelot: convert to phylink") Signed-off-by: Horatiu Vultur --- drivers/net/ethernet/mscc/ocelot_vsc7514.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/mscc/ocelot_vsc7514.c b/drivers/net/ethernet/mscc/ocelot_vsc7514.c index 18aed504f45d..96ac64f13382 100644 --- a/drivers/net/ethernet/mscc/ocelot_vsc7514.c +++ b/drivers/net/ethernet/mscc/ocelot_vsc7514.c @@ -954,6 +954,9 @@ static int mscc_ocelot_init_ports(struct platform_device *pdev, if (of_property_read_u32(portnp, "reg", ®)) continue; + if (!of_parse_phandle(portnp, "phy-handle", 0)) + continue; + port = reg; if (port < 0 || port >= ocelot->num_phys_ports) { dev_err(ocelot->dev, -- 2.31.1