From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1CBCCCD98CF for ; Mon, 15 Jun 2026 14:18:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Subject:Cc:To:From:Date:Message-ID:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hkIb+b4xA4Dtv3ljZrlwMo9RpQWTNWYQCjFJM6rj18U=; b=WkpoGCzAGojWqwtu+gU6qQHCY4 BNhCp1jgnrgkrPJ6Ehu1OoHeYdQ7SR8Ti0+Qq3bDT0kzQi4N4DDz7PY4zmHps47VgCAoyuk9DOvJg EmdmYFWosZ0NmHHofkdHafmpFfQ0jFFKuntaTmOHUWmExNTqefhZQh8tKa3XRjr6eCuyijkHr1O7a 1RPGFnSNpmrD243sc1D2Tkbden5wbv53/hS/FQJiPP8LHnr22mm5R0v9ghTPlij95rWckwknDoLHe OKDT35r6uAfyCbUvx+DcOtSxVSnJQvd3ekhNdIfxpk7JS8TIJSWYM+FBW0p3ZHJtrl+ovoFq7M2My 8eIC6/Qw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wZ89H-0000000EO4X-0bG9; Mon, 15 Jun 2026 14:18:47 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wZ89F-0000000EO3g-0Y5Y for linux-mediatek@lists.infradead.org; Mon, 15 Jun 2026 14:18:46 +0000 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-49222b6e871so20362745e9.3 for ; Mon, 15 Jun 2026 07:18:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781533123; x=1782137923; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=hkIb+b4xA4Dtv3ljZrlwMo9RpQWTNWYQCjFJM6rj18U=; b=WoGBWv/j8ibIxllhx1tqvIa6z+QhntQWPAl4xIXAEMgwzBOz8czgimA8vsSkrGpaE3 UsEPz8UdsBtGn2QvP1825EQOfPV2/m782FrOt1UB+grMUozoLDc5r2wS9CqC2JHKcygf 58PfGUkiuWQl6VR3N2gknlZriFa+GrtpiufpZIe4/VJOGb1RFc6d8iZHP4qJqRL5EUVm OKPyETGgdHrAA0ZDuc4rn2LFUhny1JuL9oq3aw+1+XIug+Jg8osiOhdSGSIntmaeo7nA TY1GEOTenrJ82uw00fF8dFiE4lMf0fREQTHAYzXlz2VlbtOmcCwC3HS1l3lXjbq5q1YJ Evyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781533123; x=1782137923; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hkIb+b4xA4Dtv3ljZrlwMo9RpQWTNWYQCjFJM6rj18U=; b=NSfXmvPyQ+0x7Klo3vtOjca1GIS753Vo/5PfZDCzGyCHFTG9zftUk/IAN8ixe7AqbK qWbY8dQdhM6k9Pn7jf04g61l4XizYkmA7uNDA+0k4N1PCSgPsegbsZHONOVdFxlVMMc3 4etzhd6e2k7IbZApIdX6+8U3b7H5x3/DM7bAsXgutYn1oxKFQgwRPGNFOT3qwCO7y7KY zJsTdgo30T+2FDZpMcPWVl9Zhmzuah622pTVmmmHf1ZoK+2tsi/DIrxuawUgN5TJX+o9 iGkPHHQyahWKoY2kX0IxlAHMYqC8PJOGtT6JRU5aIQp8RP123K9/MHcoRsN+Dd0Bo5Pc 04ww== X-Forwarded-Encrypted: i=1; AFNElJ9+Rdk7GG+FEmBceaJpnZXLLJAMcdZeKMMoQrls2cmfCcHp8BmfyGVpjwc2Zj2iWOEy3clOHsCyzxvcz2ut1A==@lists.infradead.org X-Gm-Message-State: AOJu0YyzRkxu0OUpsvewKXYPmi8l+aOs3AP6ufY/TFpwEA+7UeIkCUHX qANl6oQxGkrZmyInh7PBaoYzAgmYFq6kXWGu4J32u/WFHBXLN2c4CCzG X-Gm-Gg: Acq92OHCXh9vKq24HnP8wWruQwhenUAuxiVcwPoS7edvWMABOAycfLFKYf2HIpx42ej ZKsJMiruRz+TsyiQgs6RGpiCo+jmJpagCNo1HbUMCEcPo+4cLk6gGmsbm45tnawMUWNF1EnfUHC cCWMW6ruVp9EzWzZM72NschjkWiaxNjGqiFA/79JLpi52owyIfiTM0wqY6mQQ243dtGlywW2CZd hEyuWrIEuczbKThHt7XY9FHgRnVckQ3v95q6MtwhnQppMp3bVg+Q0hX7pVcq9V+fv9itVYd/v/i cutEVQynmHSDrynFOhTjMcmtWn9w3VvPLLp0t3E3/PgHJr0liVC9iwPO5DSmMhxCCbWDqfLp7+u 93y++dkbqXeUDOfQEDSt9UJjTKrs/0/2UTFQx5vAvFmBuC+ZYw6zKHE62nUfJYC0ilpC/YNaEHd 6EcZl0blbX9QOis6EJZ1iMH4/eMfn3buCKfTWrBWt2zfYPg3Sgt/dCVw== X-Received: by 2002:a05:600c:3153:b0:490:e5c1:b897 with SMTP id 5b1f17b1804b1-490ec4fe7c2mr195111285e9.20.1781533122746; Mon, 15 Jun 2026 07:18:42 -0700 (PDT) Received: from Ansuel-XPS. (93-34-88-103.ip49.fastwebnet.it. [93.34.88.103]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-492202edec6sm283566035e9.3.2026.06.15.07.18.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 07:18:42 -0700 (PDT) Message-ID: <6a3009c2.561280e1.2acd9f.2f06@mx.google.com> X-Google-Original-Message-ID: Date: Mon, 15 Jun 2026 16:18:37 +0200 From: Christian Marangi To: Maxime Chevallier Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Simon Horman , Jonathan Corbet , Shuah Khan , Lorenzo Bianconi , Heiner Kallweit , Russell King , Saravana Kannan , Philipp Zabel , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, llvm@lists.linux.dev Subject: Re: [PATCH net-next v7 01/12] net: phylink: keep and use MAC supported_interfaces in phylink struct References: <20260615122950.22281-1-ansuelsmth@gmail.com> <20260615122950.22281-2-ansuelsmth@gmail.com> <371a1df7-084c-4431-bd00-0045298e3212@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <371a1df7-084c-4431-bd00-0045298e3212@bootlin.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260615_071845_188676_2E5B9699 X-CRM114-Status: GOOD ( 24.81 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On Mon, Jun 15, 2026 at 03:33:34PM +0200, Maxime Chevallier wrote: > Hello Christian, > > On 6/15/26 14:29, Christian Marangi wrote: > > Add in phylink struct a copy of supported_interfaces from phylink_config > > and make use of that instead of relying on phylink_config value. > > > > This in preparation for support of PCS handling internally to phylink > > where a PCS can be removed or added after the phylink is created and we > > need both a reference of the supported_interfaces value from > > phylink_config and an internal value that can be updated with the new > > PCS info. > > > > Signed-off-by: Christian Marangi > > --- > > drivers/net/phy/phylink.c | 22 +++++++++++++++------- > > 1 file changed, 15 insertions(+), 7 deletions(-) > > > > diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c > > index 087ac63f9193..4d59c0dd78db 100644 > > --- a/drivers/net/phy/phylink.c > > +++ b/drivers/net/phy/phylink.c > > @@ -60,6 +60,11 @@ struct phylink { > > /* The link configuration settings */ > > struct phylink_link_state link_config; > > > > + /* What interface are supported by the current link. > > + * Can change on removal or addition of new PCS. > > + */ > > + DECLARE_PHY_INTERFACE_MASK(supported_interfaces); > > Can you clarify a bit what you mean here ? Is that the combination of the > interfaces the MAC supports AND the currently in-use PCS ? > Combination of interface the MAC supports and the currently attached PCS (not the current one in use) The fact that it can change is due to the fact that PCS can be attached later and supported_interfaces can be updated accordingly. -- Ansuel