Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3147DC33CAF for ; Thu, 16 Jan 2020 20:50:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0031820748 for ; Thu, 16 Jan 2020 20:50:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="fsuGfv2G" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387469AbgAPUua (ORCPT ); Thu, 16 Jan 2020 15:50:30 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:43136 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726994AbgAPUu3 (ORCPT ); Thu, 16 Jan 2020 15:50:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=sg2FWr3+Z440vcbvgxAjBrM909BFlT7MnKaBREjjBew=; b=fsuGfv2GTbYCfNpLRohAuyQMZD hNue+z8PEg9aJrYwMEp3fdAEBZkJZcQRZKnI4GcYlgL9o6aINTII3tbHFoQ6Z5modAQ8tu+rsxs/e ifo6hedr4UKuxkm00ATXJSKpkjTUxt6uQqnk4j56eBRFeRIKxSHy1C90G/PQBcg24FTo=; Received: from andrew by vps0.lunn.ch with local (Exim 4.93) (envelope-from ) id 1isC5z-0000pm-0d; Thu, 16 Jan 2020 21:50:27 +0100 Date: Thu, 16 Jan 2020 21:50:27 +0100 From: Andrew Lunn To: Vladimir Oltean Cc: davem@davemloft.net, netdev@vger.kernel.org, linux@armlinux.org.uk, f.fainelli@gmail.com, vivien.didelot@gmail.com, claudiu.manoil@nxp.com, alexandru.marginean@nxp.com, Vladimir Oltean Subject: Re: [PATCH net-next] net: dsa: felix: Don't error out on disabled ports with no phy-mode Message-ID: <20200116205027.GM2475@lunn.ch> References: <20200116183449.3582-1-olteanv@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200116183449.3582-1-olteanv@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Jan 16, 2020 at 08:34:49PM +0200, Vladimir Oltean wrote: > From: Vladimir Oltean > > The felix_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: bdeced75b13f ("net: dsa: felix: Add PCS operations for PHYLINK") > Signed-off-by: Vladimir Oltean > --- > drivers/net/dsa/ocelot/felix.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c > index feccb6201660..d6ee089dbfe1 100644 > --- a/drivers/net/dsa/ocelot/felix.c > +++ b/drivers/net/dsa/ocelot/felix.c > @@ -328,6 +328,9 @@ static int felix_parse_ports_node(struct felix *felix, > u32 port; > int err; > > + if (!of_device_is_available(child)) > + continue; > + Hi Vladimir for_each_available_child_of_node() is i think a better fix. Andrew