Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3570090ybi; Mon, 10 Jun 2019 12:32:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqxgTlbrPR3WipwGhlV4qhIucPN8a0c5/LQQXV4WKGET58nupviKJifIAs1pRcVYa1OYl62i X-Received: by 2002:a63:6c4a:: with SMTP id h71mr15055705pgc.331.1560195139342; Mon, 10 Jun 2019 12:32:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560195139; cv=none; d=google.com; s=arc-20160816; b=VDSLLg9lrA5rf2nPW4S2Pi6xYqB8/j0ER56tiU5Wf+CYAjnXZ6bXzXZhd0aLoxEzmy j6q1y+R18qxkzSxIegQnrXjRCTynkKNjoTqZR6USpyFyDYe7+Dquot7YMvNFtHSmXzxO 7417wEPozn4owCJh8IjiyRExdvfzjWlNzxV3DTWasI9a3rpFpmpWZSF8lkj2z89Ogy2o 000sC3lj+gV0Qfoa/bBmCPukEVjhNct1to9w3TGqefYfpI1Cq/AgqtPrjuKC+o8z3JsD IORdk9bgWpJ7imdlrQmw8M6coPcTqT9L0jVtlkb/+92DSXlKondeuoE6+3vqB2vhNN8u EIFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=eUPzmPUFDWkI7Q7rSFifM1MJ4oIJgugGIlrWCoNmq3Q=; b=BZn6tQz9atF7fOP04iG1L26tTHW9UVQ/TCR2uCzrdhQ4p3QqrYaXHgzGp35FOv2FiH l/3yOl/C7e/ouFweJIsVVyifROefFUV0TB50GvJ1T3cQop9dXNy+c//cb3oCFXTpqfPh X+BOUWgrgXd4LODshAI3c941+gcem00Y0ymdraEh8tPNqk3x1X4zW9Db7iHx9DtG77iW G/eD07rFmCYYluy4CKiUhjvchrrcs6cfQXaHpC+DytQwhPW/l+eQVdK8aFGkKdez+EjM hATdDH4bNTUAIThpuZqgKQNuUXGOiTZJiGyem3VKK4JCIhRENZdWWCncnc/cazMFkrGu MboA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HOr0KjsX; 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 j12si10010446plt.101.2019.06.10.12.32.03; Mon, 10 Jun 2019 12:32:19 -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=HOr0KjsX; 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 S2389072AbfFJTb6 (ORCPT + 99 others); Mon, 10 Jun 2019 15:31:58 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:45616 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728276AbfFJTb5 (ORCPT ); Mon, 10 Jun 2019 15:31:57 -0400 Received: by mail-pf1-f193.google.com with SMTP id s11so5852221pfm.12; Mon, 10 Jun 2019 12:31:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=eUPzmPUFDWkI7Q7rSFifM1MJ4oIJgugGIlrWCoNmq3Q=; b=HOr0KjsXy4RvLxgagrmOUQpJlnirP4L3ubMpzwf7mujRoVTQQ6oquZ/HmC0RcCTHdZ IXP6CcqOWCTJ2RFIUFNJ/YWPEm6/AYmxNqH745cv/A3GZZ6xV9qgps3PelinTlWlIWjd zcOKz1hTmtDSqWjjOO8cRJ/gyaGrIWugbpXwYn2ya6Eec6zPfwpk4dkZZd4WmRC1r0I/ pRCWHd9kbC6MjH+6BSj865Mj9F0zUh2y20DDMhMcRoyjs5y2lkoiDvb21UNRhuq2XgM2 SWpnv960bgYcdztPlcRqLHwCuObRsxo+tjGvhOLmTHL0+HbAlO9uftzuuMQOod5HG1N0 37GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=eUPzmPUFDWkI7Q7rSFifM1MJ4oIJgugGIlrWCoNmq3Q=; b=bVuVSSGsV6VGD0KBHjuakcnIyz7kFGnY/G8nWMjzYsFe3H0J33xruI9kNSE/2bUPrK f66jXAYti/xLvhPRNOGWdmsTbqUN8YaHNSVpBHwSCACAp2AodZrdBki8gR/PpKB1o0SD cpB9Vn+YT6XpUt3ZOcUTmVHt6La61vP3d83Z3xj/nqfFpVgtIbtDDM1AqMPgwSOg0Bw8 fDBUkc8S1uQ6hX2amo2VYvHORytZ46MCCIGu3SUpjSuJyD6OlFw/3LlcQ54r9swHKMdZ 429KnTKfV0wMWOzyJnO/iXj4aY5UYzf5dvzKM/rrXnYKl7mc2r+BvQ2bRSrKZQShwI7A 64Jw== X-Gm-Message-State: APjAAAXd4d9vXerj/I3goR7LCapAOaBtqUE5wot91Yy9Cerbou+ckA3B cdfT0eY/Koz3R+8Jjmas0qCnGTqk X-Received: by 2002:a63:d84a:: with SMTP id k10mr2546494pgj.74.1560195116295; Mon, 10 Jun 2019 12:31:56 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id a64sm10786802pgc.53.2019.06.10.12.31.54 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 10 Jun 2019 12:31:55 -0700 (PDT) From: Florian Fainelli To: netdev@vger.kernel.org Cc: ioana.ciornei@nxp.com, olteanv@gmail.com, rmk+kernel@armlinux.org.uk, Florian Fainelli , Andrew Lunn , Vivien Didelot , "David S. Miller" , linux-kernel@vger.kernel.org (open list) Subject: [PATCH net-next] net: dsa: Deal with non-existing PHY/fixed-link Date: Mon, 10 Jun 2019 12:31:49 -0700 Message-Id: <20190610193150.22231-1-f.fainelli@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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