From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f65.google.com (mail-ed1-f65.google.com [209.85.208.65]) (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 44AAA3E9F76 for ; Tue, 20 Jan 2026 12:11:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768911082; cv=none; b=ezTOoSQ8/8lX894IJX4v45DlHNQw6zDAN5If1k5YZAX9W+1Ni/FUVEbtEdpf81u8Pr47x2MCvpaY0zpDBaS38vfnxMECjYOjEeOdw59Are3aeuQz/GxmdrVdLvrY5PWGqf8IlE3Syvmwjal83odCSDlbuL3QfRW3OwGMG1VgJNc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768911082; c=relaxed/simple; bh=slZnAA52hGrFdTpmjpe7wyFEKpTUV81xk18IsByotC8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eo75X/q0TWHGRQIsP0OITON7xwy+0lLCX5XYtsuntfkgvCosG83mUCFvqcNSnAjIFTngV+v700R/FJ9m9ATdACqOPbTro5jae0i6HqNz1648OQOnAHEoHns9YOIr/VKjJ7D05Kj8BQQIaENkaivg3xYOuZTPfTBi/VFxYhIjFI8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=RRFdRonN; arc=none smtp.client-ip=209.85.208.65 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RRFdRonN" Received: by mail-ed1-f65.google.com with SMTP id 4fb4d7f45d1cf-64c72418c6eso939660a12.1 for ; Tue, 20 Jan 2026 04:11:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768911078; x=1769515878; 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=EdNwNcGnrHVRj7c7tzYxsUBjZ6i7z3klcWNlJbURQPw=; b=RRFdRonNmgQR3KU5OcQZqZy0IFfHC/H0GTsJ1+5n1Cy5gZRhwvo8WEmTZceAtFnfPO B6RmJ3MrCZgMtUCaXJQ0HFhkSHuRFI9Kc/DTTe7VyX6xytb3RM5eaVHGYu4bppdWEc2I +Ks6vBCiEs7l+9O/ZDiYwbggRPYQYFKhD4f1oZ44R8KePw6nhr3MZPSTYd4HyxyCJHhD jnWfoKh00/NZCWLlKMtkEoHgCy7MNvz/xmLHpbIkoHjSChMBo48rY1wX35aTlX/Qq4Hk VDKJuqSeYm+1UGzK6F9c3Ska044LNOqSdxny7tF6ZvmxLdqBpN9tXhw0FEJAll4uYVO+ QjtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768911078; x=1769515878; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EdNwNcGnrHVRj7c7tzYxsUBjZ6i7z3klcWNlJbURQPw=; b=OjKBVE9nu8Eha5gpBbqkLI7hG6XhhErk0O6d2xcpT+QsB0Bb7VCSDVK6DdSCnimwm/ X3+9KNuED5Xobd4t+u48FUq4W3mWP69+p7W3sEgGEm6aHrDbfZR7Gy1AMIptwfV2aiAW KxpmnhKTaxHUAuLNTyMNOe3aMg5jY0/Q+uLOJu1Ue/VgAxFbfChwv2b0x1pUCQhxwwFQ TWsiU18u2I5b4F4anZiJf6xwTb1L4VN/E3AucJsrzl1ThKRCJ3cAT0i2i/5MzHFr3FEx LtwXCFo6uv90iMv1G7rb3Mb8siU90IslVfjjmygH3aiXMLMVSjLouKidhONBwZczUq6Z dfzg== X-Forwarded-Encrypted: i=1; AJvYcCXiE58Rfj4cdMHxVC+Jp3oonFIcMbkjpyDfDzW506i+g++6pdHgbMO/jeGMSWAEKmsFCPyQgk4=@vger.kernel.org X-Gm-Message-State: AOJu0Yw1zPBmln6DubiPAEsGwXM6jncwCZ0gUADt7/gd7EVOEg0ZXDRO EOkVsNw2DF1aZNYUPfplkWITSyPE6RICy6nZtrpPbJCVNsYak3jCZ9Yh X-Gm-Gg: AZuq6aIf3JBaPI23YGUOgdsQrUrlfqlQsvzLgj3LwoMP7EYlWTUgBuqExYMELzLvrke O/EGqFrG/0sd0L5XY2sDGGPwoqqO04gIfBLZq3NyrxfABApmp5HqzR4sKLryDHm//IHLr0TnMbK vBrU8JQuVbrMB3kt3Ih0lumIBLNECP1TNsCB0Q2jWEGsObWbDktXoe94k8W0klSi0QTwf065G6e Ixhzg3Xgi05oO7SYLeoabU9uNXIN0k+qDW6vkN4YKcloXdibKERBccVUTE2VrRaznOcveEE610c 4MMMFvg1GmYGv7WXNc0nsE/sMn96Rynrnj4CpBX8QfSUzVmL2dqlOl99lxUS9bSRJv9MdJ3ssUt IFqGFlPFo53Fg+lZLXy+hfNGomEicBt4K1qczrd/iinmogquQG/w11izs/17X6sEauZlvwLCjNQ mpZQE= X-Received: by 2002:a05:6402:348d:b0:64c:9e19:982d with SMTP id 4fb4d7f45d1cf-654523cc85bmr6515961a12.1.1768911078156; Tue, 20 Jan 2026 04:11:18 -0800 (PST) Received: from skbuf ([2a02:2f04:d501:d900:619a:24df:1726:f869]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-654535c4aa7sm13503305a12.34.2026.01.20.04.11.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jan 2026 04:11:17 -0800 (PST) Date: Tue, 20 Jan 2026 14:11:14 +0200 From: Vladimir Oltean To: "Russell King (Oracle)" Cc: Jakub Kicinski , linux-phy@lists.infradead.org, davem@davemloft.net, maxime.chevallier@bootlin.com, alexandre.torgue@foss.st.com, mohd.anwar@oss.qualcomm.com, neil.armstrong@linaro.org, hkallweit1@gmail.com, mcoquelin.stm32@gmail.com, netdev@vger.kernel.org, edumazet@google.com, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, vkoul@kernel.org, andrew@lunn.ch, pabeni@redhat.com, andrew+netdev@lunn.ch, linux-stm32@st-md-mailman.stormreply.com Subject: Re: [net-next,05/14] net: stmmac: add stmmac core serdes support Message-ID: <20260120121114.2aedgu42i2wax3yp@skbuf> References: <20260119192125.1245102-1-kuba@kernel.org> <20260120081844.7e6aq2urhxrylywi@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: On Tue, Jan 20, 2026 at 10:12:46AM +0000, Russell King (Oracle) wrote: > First, I'll say I'm on a very short fuse today; no dinner last night, > at the hospital up until 5:30am, and a fucking cold caller rang the door > bell at 10am this morning. Just fucking our luck. Sorry to hear that. > On Tue, Jan 20, 2026 at 10:18:44AM +0200, Vladimir Oltean wrote: > > Isn't it sufficient to set pl->pcs to NULL when pcs_enable() fails and > > after calling pcs_disable(), though? > > No. We've already called mac_prepare(), pcs_pre_config(), > pcs_post_config() by this time, we're past the point of being able to > unwind. I'm set out to resolve a much smaller problem. Calling it a full "unwind" is perhaps a bit much, because pcs_pre_config() and pcs_post_config() don't have unwinding equivalents, unlike how pcs_enable() has pcs_disable(). I don't see what API convention would be violated if phylink decided to drop a PCS whose enable() returned an error. Similarly, the fact we don't have to whom to report an error code doesn't make it pointless to offer the guarantee that pcs_disable() will be called only when pcs_enable() has succeeded. It is only the latter that seems necessary in order to develop reliable complexity on top of these. If SerDes PHY integration in phylink_pcs drivers is a model to follow for other drivers, I think the way in which balanced calls can be made from pcs_enable()/pcs_disable() needs to be given more attention. And I think it's a bit worse than "doesn't matter, the port is dead anyway". For example, we can have QSGMII where 4 PCSes share a single SerDes lane, so one single malfunctioning PCS instance can affect all the others through the lane's phy->power_count.