Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp2913346rdb; Tue, 26 Dec 2023 09:05:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IHYF629jTA38dbjeOPzXJLStDYF1H6HJLeSXxoDkYCO5sr2aS4MmKeGGxBlYyoOR2dx5ToE X-Received: by 2002:a05:6214:410a:b0:67f:631:4856 with SMTP id kc10-20020a056214410a00b0067f06314856mr11151829qvb.111.1703610324127; Tue, 26 Dec 2023 09:05:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703610324; cv=none; d=google.com; s=arc-20160816; b=HU9z38xqPsH/eGhsnjHqntAX7joDNsFFqdrUxuyZDZr85KG2c76c5alFb3Eyok4qs1 py07Aj0clDAqXmniA8JKQ6tY76a3XbPRNYY35skc1YRax9HAxNhekZDijP9Aa1qT3gJm iwqt4qxQ5zTG9eWgEZQplcGdZHnPxNU2fQmenWdSBIIUzMpwcYOWOXRQDE+phVd7AW+G sVmXI3d/mq0jyp3lwcM2vylcIMIdWMTQn8i2byuKqS1vIy248KLQn0J4orIxqyKJ7huh d51aR7q5hgJpFN/yCuaGdGLKp76KWnZzCErc0oxx66sSCNy2saN6k5cUMAXryAXRpEPA EDEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=COhuaSnIAGJCtWBOds7qZex5HBBn0HSMvsViTbnhv0E=; fh=dQI2exvmeIJhcF+LiGW1fP/oG4/xyZwbaIIOW6IARKU=; b=KDkH6+TnAxoIuU/HVGNgU0Y4iWiW+9nc96WBRXa9ArWoZmQY0aX75M/VojOHPJdVco oCITP+upU7A6EdTKttJ3CElsfIHTFWtHStNiDPur1wIOJp+aGfrILWi8PiN0OM8/eEG9 m6E0wjF0+rcVMctzLl/sTpZ7o68NbAoJHAU8jdiI5TunKY4gLW+CI4c7MySRZ/AH6iNP SovLLUAfOBPG6ClDMkMa8lBVuguNrcHuMUxloi2coRYV+Fdm75D5Xa+7/MsIzykNS0UI n8Y0czguD/unYRMEbi121z3zxPK3wYAxYOaD3WVMNVwGY/HvpibYTtLK1MsEYenYWV/I ytfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=N3HhA8a6; spf=pass (google.com: domain of linux-kernel+bounces-11588-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11588-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id q1-20020a0cf5c1000000b0067f85fb3dd2si11731547qvm.465.2023.12.26.09.05.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 09:05:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11588-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=N3HhA8a6; spf=pass (google.com: domain of linux-kernel+bounces-11588-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11588-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D7B8A1C20D46 for ; Tue, 26 Dec 2023 17:05:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7CB2E4F8A2; Tue, 26 Dec 2023 17:05:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="N3HhA8a6" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4984D4F880; Tue, 26 Dec 2023 17:05:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-a2370535060so991161866b.1; Tue, 26 Dec 2023 09:05:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703610312; x=1704215112; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=COhuaSnIAGJCtWBOds7qZex5HBBn0HSMvsViTbnhv0E=; b=N3HhA8a6tA9u36WAPko6snk32OizhcW6Gr1sAzVjmyru4F4NIM8PJ4hw/Q6lDRp9KE TinOtXBgXkpmTsoAuTS4l0423vJbFRQgqu5zxpNNfj2h3bWFMDzWLvcCE0FLH4o2c79B 6QdFgIDnejek9MYoWQgxNTiyLYLMBVFp4d2KXZqLjMQg59f7kiRa1rFP1BNDAE5ypJpK xL+AUhg8QhCi8sYpNAW+b4SNY2LToKOvQmA7/0G8ufokN/lhpBC3tGGLQVi33gG8A4XF C4Fir7TH9gjbC5ntCvi9JyovVnRfiGhRntN0Em1QBQCiCsLcILKrQRC966hUAnqMxHF5 8k3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703610312; x=1704215112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=COhuaSnIAGJCtWBOds7qZex5HBBn0HSMvsViTbnhv0E=; b=o9ln0qaixPfL4JxC0WiK9xmme85jCV8OqFLtbg/GdSssKN7OXx+9+9v2Oq7xgn0Mtx pwKD6Hty6Irn6J2YTJehPQSV9XZ4qCW3bo2C8C6jW/v1ky63ohYxE/n0yfU553gH7AhQ 5oquGVyuGScQzLKgeCrN/H+DoUHJNXGysYRecf3lz/B3pLqMFDxHOAo4EWizsAFkVbPR 1WckJdXuJSCgNS8FXUBqNrU1QIvs0+BxUswRkgVTGDaF0JLytLvofhCihp8rzPd8q14a GVfA4PBuU8sAdRXMZRLgCZLVx+R/Vf0WFECQTSt8Hr0L7/x6GzmO9Xc2whUwwlAit9/e 7xCQ== X-Gm-Message-State: AOJu0Yy5Jt/OCnd421DeximpOnQJAIQ88v0xVJL1GNx7wZ9y+7zhQaVt qeNSQ5wG68Ig5u+k7yEBrisarWMltxA= X-Received: by 2002:a17:906:57c1:b0:a23:54aa:311b with SMTP id u1-20020a17090657c100b00a2354aa311bmr8174950ejr.34.1703610312230; Tue, 26 Dec 2023 09:05:12 -0800 (PST) Received: from skbuf ([188.25.255.53]) by smtp.gmail.com with ESMTPSA id h22-20020a17090791d600b00a22fb8901c4sm5950374ejz.12.2023.12.26.09.05.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 09:05:12 -0800 (PST) Date: Tue, 26 Dec 2023 19:05:09 +0200 From: Vladimir Oltean To: Andrew Lunn Cc: Jagan Teki , Heiner Kallweit , "Andrew F. Davis" , Florian Fainelli , linux-kernel , netdev@vger.kernel.org, Michael Nazzareno Trimarchi , Ioana Ciornei , Shawn Guo , linux-arm-kernel , Fabio Estevam Subject: Re: PHY issue with SJA1105Q/DP84849I Design Message-ID: <20231226170509.vysmvg6soz54xekb@skbuf> References: <20231222145100.sfcuux7ayxtxgogo@skbuf> <20231226153055.4yihsmu6kiak6hkf@skbuf> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Dec 26, 2023 at 06:00:17PM +0100, Andrew Lunn wrote: > > The code which should have prevented this from happening is in > > phy_attach_direct(): > > > > if (phydev->attached_dev) { > > dev_err(&dev->dev, "PHY already attached\n"); > > err = -EBUSY; > > goto error; > > } > > The problem might be dsa_shared_port_phylink_register(): > > err = phylink_of_phy_connect(dp->pl, port_dn, 0); > if (err && err != -ENODEV) { > pr_err("could not attach to PHY: %d\n", err); > goto err_phy_connect; > } > > return 0; > > Since it is not -ENODEV, it just keep going. > > Andrew "Shared" ports are DSA and CPU ports, the report is on a user port. There, if phylink_of_phy_connect() fails, we try dsa_user_phy_connect(), but only if the driver provides a ds->user_mii_bus, which sja1105 does not. So the failure should be nice and clean. It might be worth posting a full boot log though, since this is really strange.