Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4825634ybl; Wed, 22 Jan 2020 05:27:51 -0800 (PST) X-Google-Smtp-Source: APXvYqxbp+x6Iw9F4iiHU2yXweCkJXOJ6FDAGgL/IH3xmMAa8gBhtyUIb8f2Cf3+12gPmUhchLb0 X-Received: by 2002:aca:d502:: with SMTP id m2mr6628046oig.41.1579699671634; Wed, 22 Jan 2020 05:27:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579699671; cv=none; d=google.com; s=arc-20160816; b=bQUJoPo+zk/vSqfrAzJuiScTg/CfhO8AlGdGkpT+k5h+2pI77cyHp+msq/evHeeHN0 GTxNBbQgn5uSwLFC1jcW3dPlihw2xPNb1aLb2YxD9xrbPpqN9LWx557XUfl9ZPQ7kCrc BW8CCUKQ9vwQ/RFyEeztVrqzdHiGWl/mOJKMasDL5m9en3X7ryLsBJRdxEu3mgnrlrsU lnOnNyFiXEtpq0RMgKshGqSe/jefEyp83YvQzDQZzdurueaROsaLd28DwMP02l/hYwTr mYOfJtUoZdvcb7QZXbBAN5cmofTNIgJoli2KXPzTDnWS4iktU8tMrdPLQZw6LTnz5MG3 2qZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QxRTSU/ZJGea7f2kmUZWlcK3EilTGoaHwJlIVv3aS1s=; b=rSkplEdzSyQ0WrNAvOQVQQrnUIzrd+J0N9fQwTY73DK2dwPYRKFKQM3Z6A5ZsNGJjz Lo9YTBvnWISRGFgJheaH0Cfq84Txd5fokiM/x7ZvivZ2DIOHiC4zHHoIf8ZTYcSkycqq YJ2Ubgx4T2e6PAZ5ctix57q3yXGo9ABxqB9qfhyN5BJUp3VleUXa+8eS5H3HVogtmH6g NMKqX4pPXB9a7N2/BSvVWc3/zpea0J2CLtYVhb9qz/k7Utt28HBobl7uN899VF8eq4lb zyL5np+A6pG8eeX5+WsO8WzrQWbxoGZFpPXic6eCDXGoIMgysO1tf4jWCYPskdgxTQcf jLbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="JP8uBXw/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m24si19940151oic.11.2020.01.22.05.27.35; Wed, 22 Jan 2020 05:27:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="JP8uBXw/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731651AbgAVN0j (ORCPT + 99 others); Wed, 22 Jan 2020 08:26:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:47488 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729163AbgAVN0h (ORCPT ); Wed, 22 Jan 2020 08:26:37 -0500 Received: from localhost (unknown [84.241.205.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 81E2F2467B; Wed, 22 Jan 2020 13:26:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579699597; bh=iR1U0/WnRAGvGxdyyz4HUMNeZ8ZDG2l7f4/0G42mBxM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JP8uBXw/zBMdSJWOzjtEZDJEKqIrIVMVsuLrWBusagTVt1ufo++syL4iTiRZ8OeZ+ OQexnLjxaMhZy1uHLbxwYgsuDpOtDbv7U7a73GstSjSNJh8DzvawdWJCSRAAcCUYke GOxyqfQJi8rvTKI9F1tpmiQ4s68X2VyFPLaawhO4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vladimir Oltean , Florian Fainelli , "David S. Miller" Subject: [PATCH 5.4 154/222] net: dsa: sja1105: Dont error out on disabled ports with no phy-mode Date: Wed, 22 Jan 2020 10:29:00 +0100 Message-Id: <20200122092844.746801953@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200122092833.339495161@linuxfoundation.org> References: <20200122092833.339495161@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vladimir Oltean [ Upstream commit 27afe0d34e9121a3d61cc0af9b17c2542dadde24 ] The sja1105_parse_ports_node function was tested only on device trees where all ports were enabled. Fix this check so that the driver continues to probe only with the ports where status is not "disabled", as expected. Fixes: 8aa9ebccae87 ("net: dsa: Introduce driver for NXP SJA1105 5-port L2 switch") Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/dsa/sja1105/sja1105_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/dsa/sja1105/sja1105_main.c +++ b/drivers/net/dsa/sja1105/sja1105_main.c @@ -619,7 +619,7 @@ static int sja1105_parse_ports_node(stru struct device *dev = &priv->spidev->dev; struct device_node *child; - for_each_child_of_node(ports_node, child) { + for_each_available_child_of_node(ports_node, child) { struct device_node *phy_node; int phy_mode; u32 index;