From mboxrd@z Thu Jan 1 00:00:00 1970 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=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 6379EC432C0 for ; Thu, 21 Nov 2019 00:19:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0F86620878 for ; Thu, 21 Nov 2019 00:19:11 +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="BO6QvKri" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726574AbfKUATK (ORCPT ); Wed, 20 Nov 2019 19:19:10 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:48678 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726230AbfKUATK (ORCPT ); Wed, 20 Nov 2019 19:19:10 -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=z8TpGyPkN/p6hj6xK/93Z7LOZPrtWo7AAZ1PB0/RZDI=; b=BO6QvKriOH/Y2xsYKz8gxC1eKg Dx3vpTWzq6MnsGlkfhaBiUovEEAxR8MzsQ4B//oLfeHSmUNQ9QN1ej+MR9pLw4bvGXjzm09OzVv3E Z57dQboT9awPaMUTAiuVYr5syiJC5R+XqZEF5sXxn4nhIuGHFP/k9Vg3JYPJxzbuMPu0=; Received: from andrew by vps0.lunn.ch with local (Exim 4.92.2) (envelope-from ) id 1iXaBT-0006mF-N1; Thu, 21 Nov 2019 01:18:55 +0100 Date: Thu, 21 Nov 2019 01:18:55 +0100 From: Andrew Lunn To: Horatiu Vultur Cc: Vladimir Oltean , "David S. Miller" , Russell King - ARM Linux admin , Alexandre Belloni , Florian Fainelli , Vivien Didelot , Joergen Andreasen , "Allan W. Nielsen" , Claudiu Manoil , Alexandru Marginean , Xiaoliang Yang , "Y.b. Lu" , netdev Subject: Re: [PATCH net-next 0/2] Convert Ocelot and Felix switches to PHYLINK Message-ID: <20191121001855.GC18325@lunn.ch> References: <20191118181030.23921-1-olteanv@gmail.com> <20191118231339.ztotkr536udxuzsl@soft-dev3.microsemi.net> <20191119204855.vgiwtrzx3426hbrc@soft-dev3.microsemi.net> <20191119214257.GB19542@lunn.ch> <20191120120849.xdizdx4vntor2fvv@soft-dev3.microsemi.net> <20191120232152.p22rfjdngm4wtmak@soft-dev3.microsemi.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191120232152.p22rfjdngm4wtmak@soft-dev3.microsemi.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > Not really, at that point it was OK to have interface > PHY_INTERFACE_MODE_NA. There were few more checks before creating the > network device. Now with your changes you were creating > a network device for each port of the soc even if some ports > were not used on a board. That does not sound right. If the port is not used, the DSA core will call port_disable() to allow the driver to power off the port. It will not create a network device for it. Or is this just an issue with the switchdev driver, not the DSA driver? Andrew > > > serdes = devm_of_phy_get(ocelot->dev, portnp, NULL); > > > - if (IS_ERR(serdes)) { > > > - err = PTR_ERR(serdes); > > > - if (err == -EPROBE_DEFER) > > > - dev_dbg(ocelot->dev, "deferring probe\n"); > > > > Why did you remove the probe deferral for the serdes phy? > Because not all the ports have the "phys" property. You probably need to differentiate between ENODEV and EPROBE_DEFER. You definitely do need to return EPROBE_DEFER if you get that. Shame you cannot use devm_phy_optional_get(). Andrew