Article View: linux.kernel.netdev
Article #16022Re: [PATCH net-next 3/3] net: mdio: mdio-bcm-unimac: Add Clause 45 support
From: Andrew Lunn
Date: Fri, 13 Nov 2026 22:04
Date: Fri, 13 Nov 2026 22:04
18 lines
9022 bytes
9022 bytes
> +static void unimac_mdio_set_clause(struct unimac_mdio_priv *priv, bool is_c45)
> +{
> + u32 cfg = unimac_mdio_readl(priv, MDIO_CFG);
> + u32 new_cfg = cfg;
> +
> + if (is_c45)
> + new_cfg &= ~MDIO_C22;
> + else
> + new_cfg |= MDIO_C22;
> +
> + if (new_cfg != cfg)
> + unimac_mdio_writel(priv, new_cfg, MDIO_CFG);
Is the write expensive? The bus is not faster, so is this optimisation
even noticeable?
Andrew
Technical Details
Message-ID:
<e4f0d156-a7ef-48d6-a034-955e01ef90a6@lunn.ch>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362950-linux-kernel-netdev=dewy.ruReferences:
<20261113211554.2058181-1-florian.fainelli@broadcom.com> <20261113211554.2058181-4-florian.fainelli@broadcom.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362950-linux-kernel-netdev=dewy.ru From: andrew@lunn.ch (Andrew Lunn) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next 3/3] net: mdio: mdio-bcm-unimac: Add Clause 45 support Date: Fri, 13 Nov 2026 23:04:38 +0100 Organization: Usenet Network Message-ID: <e4f0d156-a7ef-48d6-a034-955e01ef90a6@lunn.ch> References: <20261113211554.2058181-1-florian.fainelli@broadcom.com> <20261113211554.2058181-4-florian.fainelli@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="1452322"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:VuddSK5ClopXWqQKq8HdbYQSuNU= sha256:fjL5NH7pVT5jJMPHp1kPF40jtpYiwvtiNZU+MpcmDjc= sha1:1juzajNa3ceAhnwBgRRsJ8pA144= sha256:+pDSk3R/JPx1iGp5rkBO35TXJSgTrL/hd9BkYIg614g= Content-Disposition: inline List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 16E7E1146C1; Sat, 14 Nov 2026 01:15:20 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.05 X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=lunn.ch X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id q85j_mnNipV3; Sat, 14 Nov 2026 01:15:15 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-362950-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lunn.ch X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 8F49C1146BD; Sat, 14 Nov 2026 01:15:06 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id C49CD2442AB; Fri, 13 Nov 2026 22:04:54 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794607494; b=DasVYhHlDZCMEr3xJUqvN60++1pL8djIhqUjEx9qBidiQJZwp2xAQPR8ihKFtX3f3onC tFAbIfoyVUlFxmfLrODCK0bLpnK2tuvf6MfQOj9l8sZpRcyWJVTW7oXs1lb/Sz2oiUVxp 3NHrd+A7aMcRFQq/LBcrvtCT+zASIKM6L/hVA3sOPf6yQukQj0FeMQxekCSEpCwT//4Oj BUmtuaabSaQ742j6cbYqYErZhAhv0uL+djkTYZ7HAi68/KjyQAfglQ6QFIVnmJMQA62bZ qcSQHo79cMhJny4kvzm2fBSNPitQMp2qZ6aYrcxn9PJWYgZ0BJOkzyVR4UnXepG5Nig== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794607494; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date: From:To:Cc:Subject:Message-ID:References:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=rKxcqwDCc8YSQZaViD5Eexs1w3IH6V9O5T4AQU6d5A0=; b=vg8wqESEAmumF/Dd0p6S1RCGksQVrMJ/28ZVpnTpeFypBzkH0kDGoEyAA/yKA7ksMgiq 9swJdR2+Tkf7Ys5j9CDlY97GgefZWU+Ac0mW9v+PkJcloMzUD+YKvYumzPaDiDn6X67Cw xlnCFlbnP+b+4GWCPSSisWFoc4gv0cepcVXtnRftooFzqglFBM5sXWBuPJrsOeJmngt29 Ta/38TGj5akOXlB0bx59z83gvwwLbLilOfkfrK5RfGVlzoFmemBUHuTvsTK6zYlcH8dAv AOz6+6scrECEg6qKiofsO3aU7TGrmyAmsg6m16QUe7Q8pxE52jVcAFs/tTE1f9pP6lg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=WcCwCPyL; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F0044606A336; Fri, 13 Nov 2026 22:04:53 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=WcCwCPyL X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794607488; b=kcclVKY8bbxKFmrXBEbkUXVnK2YmjJ+/PzgiC5jHNoQLnIKpObLPoObzSaIL3C42PO8b jw/nxNeFHbtd7Hrwlwjekq9jdtm+AOJawXAcylFoAawtpBg4cEP+yrvYcRF+FFNnqu03a 8ezMVxcMXz2jsN4u6fNoAdidb2vzH8PX3LvG1tGONNnzMkfk3gGH88gXO6m89WUXKvmJu D9RmV4ejuPkBAcePhmnk2hft6h2bOMPRyJvYYY2XSvV8vZ6yLo88m4uniehS31BtpaT+f a5pGyMQfpysjmS9JTotJ6puRFPzR+/wL4bmeqeXw5gJscBtgmo/6d/8LPA3JOtoUcpA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794607488; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; bh=rKxcqwDCc8YSQZaViD5Eexs1w3IH6V9O5T4AQU6d5A0=; b=dc/7V2a6GRlV5lgPxQvjMDOfyLPVNmEtsy7lAPucZ0uJnHfIxw2tQcy3tOoGQuaxR88h XSrPRbsADwhgBiWsRZQJXTpqamqxpNyhqNXxQn9mYi/s9kfKLRJnYnfASmntRtSH0HS8V he+haOioJEfQTrMclFfv8GO6HWK0Dv+oZs3ytiF4Yf9rcBE0MqNEZJiGyqo6Gktl9zBYp VF0qfcNPWFtlY4RdQvOgwUevxPlveDAuLJwyi0djMTuZyXbW2dKFh1v53arLpUaGZAXGb eUmgCQD47p7zxZHa6ioRJD8flEMXwnmpP1m8mRi1e2kcM0v8p/Vq88chTnKWt5YammQ== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=WcCwCPyL; arc=none smtp.remote-ip=156.67.10.101 X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE449606A329; Fri, 13 Nov 2026 22:04:47 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CE449606A329 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch X-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=rKxcqwDCc8YSQZaViD5Eexs1w3IH6V9O5T4AQU6d5A0=; b=WcCwCPyLSAYwf4LhU38k2PzlZk /SdK4omqo0Hj6rQmCM9+AcsL42+6XWoIOG+2lD6BFSJVnvb2pgUSuAlJs5yr6Z64Qm1E/lYD0uSWO Rg9W9RDvbYQ7l1Gix2Yc/yhauufuD0tEFQoytQCkdCVK2As90ejMPAM3MIcXhNu2cJjc=; X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from <andrew@lunn.ch>) id 1xRzNu-00GNCy-Sk; Fri, 13 Nov 2026 23:04:38 +0100 X-Cc: netdev@vger.kernel.org, Carlos Soto <carlos.soto@broadcom.com>, Justin Chen <justin.chen@broadcom.com>, Doug Berger <opendmb@gmail.com>, Nicolai Buchwitz <nb@tipi-net.de>, Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>, Heiner Kallweit <hkallweit1@gmail.com>, Russell King <linux@armlinux.org.uk>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, open list <linux-kernel@vger.kernel.org>, Mlody12 mlody12 <kudzo51@gmail.com> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-In-Reply-To: <20261113211554.2058181-4-florian.fainelli@broadcom.com>