Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3589172ybi; Mon, 10 Jun 2019 12:55:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHwReOTMkL6SaFGMJGko81NY1JgdJsunUGxreB7DwdYzPUcA7g3XDvIZX1BStyo3Xr8usY X-Received: by 2002:a17:90a:216f:: with SMTP id a102mr23307430pje.29.1560196546327; Mon, 10 Jun 2019 12:55:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560196546; cv=none; d=google.com; s=arc-20160816; b=AQTDHEIhQa9TsnCzERTKe2IfZSO2rM+mwbw///LClGtL7ZBxIQBO8KTPFPROuaMN0X /kjZ7sdRjBFizVPC09ZmAIDlEqZTBqgcwYWGFfAXdmywJO2mmWSVflMQGE/j502o/GNz PfAI8m6nZ0vLc6glpu8DlgRqJkmShIcOoFDWAFb6BYnZErNFiQDp9rU+rq264bgYuLoy 5dLoPV9K51ZoUn/Zby5IZQf8S8AJdz1AAtaaYlb69PFDgl1lwpZFkPhBnhBE2wKEMsUq yQLr+/ZDXKSxCA977G+tqU7CgtR0WODMgz217DosG+EHWtR09qGs09atnJC++JGqmFsI GktA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=i55Z4U6HHP04ncRU8z8qEOuvsQo8+MFGoJtJQ1qxggI=; b=T0AiTua/0Q+fc3TH/uwEsuRYNIuuR8J4Mhl4QQzbj5uDRzzX1mgdKzHqOcAy4w8w2O Dj/Mm/pd6BVU6XdPmXHEw5Uiga1xGf4VR0sT2X3gT5zvLE4nOOg7Exda5sy4D6ngB31h Ojlie+QnWxPZuA+62Xqg1eB4mwGUCywRREY64z1G791Xb3Bm061bM/4RZZ+SKTgDJ2t1 oBwktZqNQY2AJTMzVSJQHJo+qcVtAnX3sWtnWaDnQsnJaU4IRwoWdU6T7EZpWP1/z8gS LWQtsS8KSww7rrSUuLsq7Z6OUVTcf2HxAT+oSTQcdw6DSnfRD+oCD4LZc17bSEH824pG Sk/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hVy55VCq; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i2si10867880pfb.7.2019.06.10.12.55.31; Mon, 10 Jun 2019 12:55:46 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=hVy55VCq; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389408AbfFJTxo (ORCPT + 99 others); Mon, 10 Jun 2019 15:53:44 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:44579 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389173AbfFJTxo (ORCPT ); Mon, 10 Jun 2019 15:53:44 -0400 Received: by mail-ed1-f67.google.com with SMTP id k8so16150314edr.11; Mon, 10 Jun 2019 12:53:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=i55Z4U6HHP04ncRU8z8qEOuvsQo8+MFGoJtJQ1qxggI=; b=hVy55VCqLf8hQzfitNmW4sqc3n5sW4eQScHIYu60TCju2x+O2oNK8h740boBaRxLWm gnCttUCWtoVUFutQf/PUtHzMbzkbgxYQVPlA9vRjnw4FusDHizTXKG+7tIp+fUPfUmUm 0K9+JKjrHQggSA54ho9tAN/jk5C8+u7EW7SnRSiCKddeHNWCVb7mQGstmYhTWBVjGkQC HienM+LFdHUv3ijj+NlHTD5Ypjim5jmoKVSNWWZVAvY7J1vnQ2oqE4nkz+C1IEZD+jNX BUqkBdqC3/XSulFv9i6vROS019+Ja1p+T3Su/+K4tiy3ILj2aBRD6xXn176xKw0x1awf qsWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=i55Z4U6HHP04ncRU8z8qEOuvsQo8+MFGoJtJQ1qxggI=; b=cReyGS/rpPfNsDlVpLOxtnWTaDM82QpQSYJrOMJJXgZ8I/OdPscOnYCpR0KnBPi9F8 oxtO68b2EY3li1zJxYSjCT5sxouCs58gU0A8W9TTsBk1DeucpoT2tMY4eTTJZA72ALH3 D7xuxXRrdb5R4zhq80p2qWWmHt7dpRxRTGfIYJJoV7MIbuvCj1ga4qjpZRs7slNuSSYn GgtIT45KeAGshYl/i1ItjEWrjm4CfKg8NPrASoVtdvd71lC8iRndXCeRSF+K1//awN5k ZEvA+iI4qRxrJWk40eNjD58f1MBCOKil2QzkOwivSJfBsEGEuuCQJz0BRnhok1osjoOd izQQ== X-Gm-Message-State: APjAAAUE3C4nSOjOfwLQ00gS73xWG6hq4HY0WHhVYv2YoCJh80QaSawe hMe9AzLG6oobRZKYofwxRAPImZhJLtS3W/mIzGibLA== X-Received: by 2002:a17:906:19d3:: with SMTP id h19mr10748698ejd.300.1560196422555; Mon, 10 Jun 2019 12:53:42 -0700 (PDT) MIME-Version: 1.0 References: <20190610193150.22231-1-f.fainelli@gmail.com> In-Reply-To: <20190610193150.22231-1-f.fainelli@gmail.com> From: Vladimir Oltean Date: Mon, 10 Jun 2019 22:53:31 +0300 Message-ID: Subject: Re: [PATCH net-next] net: dsa: Deal with non-existing PHY/fixed-link To: Florian Fainelli Cc: netdev , Ioana Ciornei , Russell King , Andrew Lunn , Vivien Didelot , "David S. Miller" , open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 10 Jun 2019 at 22:31, Florian Fainelli wrote: > > We need to specifically deal with phylink_of_phy_connect() returning > -ENODEV, because this can happen when a CPU/DSA port does connect > neither to a PHY, nor has a fixed-link property. This is a valid use > case that is permitted by the binding and indicates to the switch: > auto-configure port with maximum capabilities. > > Fixes: 0e27921816ad ("net: dsa: Use PHYLINK for the CPU/DSA ports") > Signed-off-by: Florian Fainelli > --- > net/dsa/port.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/dsa/port.c b/net/dsa/port.c > index d74bc9df1359..dde3085ff065 100644 > --- a/net/dsa/port.c > +++ b/net/dsa/port.c > @@ -622,7 +622,7 @@ static int dsa_port_phylink_register(struct dsa_port *dp) > } > > err = phylink_of_phy_connect(dp->pl, port_dn, 0); > - if (err) { > + if (err && err != -ENODEV) { > pr_err("could not attach to PHY: %d\n", err); > goto err_phy_connect; > } > -- > 2.17.1 > Hi Florian, Can you give an example of when this is a valid use case, and why fixed-link is not appropriate? Regards, -Vladimir