From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 51A364F880; Tue, 26 Dec 2023 17:00:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="X51qlWeZ" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=6oO/nH2dTlO47uvvrA8XfEBvbbkUP87KpzAhKCfS8Po=; b=X51qlWeZpB7a5LmhCmAqMgit9V 5wlCoUbGKhz50VybZ0LOPHKRcANysy7WkeNOqBgGsqdH4sQlA0nBX5N5Womnn9mdtDNWVJ+19GBUA 5hNmsXpSFhp0iJ6dj4WSf4I69dbtZgzu5Eshaa7bJOpmpVHOl22E4cdtfowmrnUmTacc=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rIAmv-003meD-Cw; Tue, 26 Dec 2023 18:00:17 +0100 Date: Tue, 26 Dec 2023 18:00:17 +0100 From: Andrew Lunn To: Vladimir Oltean 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: References: <20231222145100.sfcuux7ayxtxgogo@skbuf> <20231226153055.4yihsmu6kiak6hkf@skbuf> Precedence: bulk X-Mailing-List: netdev@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: <20231226153055.4yihsmu6kiak6hkf@skbuf> > 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