Article View: linux.kernel.netdev
Article #16729Re: [PATCH net-next 2/3] net: mdio: mdio-bcm-unimac: Poll for completion at 1us granularity
From: Nicolai Buchwitz
Date: Sun, 15 Nov 2026 18:51
Date: Sun, 15 Nov 2026 18:51
37 lines
10068 bytes
10068 bytes
On 13.11.2026 22:15, Florian Fainelli wrote: > The current polling code unconditionally waits 30us, which was sized > for > a ~25us Clause 22 transaction, and then polls MDIO_CMD with a sleep of > up > to 2ms between samples. > > Adding Clause 45 support means that every access becomes two back to > back > transactions (an ADDR cycle followed by a READ/WRITE cycle), so a fixed > delay sized for a single C22 transaction is no longer meaningful, and a > sleep of up to 2ms between samples can add significant latency to each > access when the transaction has not completed at the first sample. > > Instead, poll the MDIO_START_BUSY bit every microsecond so that the > completion is noticed as soon as it happens, regardless of the type of > transaction. This turns the wait into a busy wait, which is bounded by > a > timeout reduced from 100ms to 1ms: a 64 bit MDIO frame takes about 33us > at > the lowest MDIO clock the driver can program from a 250MHz reference > clock, > so even a two frame C45 access completes well within that. > > Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> > Co-developed-by: Carlos Soto <carlos.soto@broadcom.com> > Signed-off-by: Carlos Soto <carlos.soto@broadcom.com> > [...] With what Andrew already asked: Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de> Thanks, Nicolai
Technical Details
Message-ID:
<6372266a7e2f7ebd83bbaf75056ce1ea@tipi-net.de>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363799-linux-kernel-netdev=dewy.ruReferences:
<20261113211554.2058181-1-florian.fainelli@broadcom.com> <20261113211554.2058181-3-florian.fainelli@broadcom.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363799-linux-kernel-netdev=dewy.ru From: nb@tipi-net.de (Nicolai Buchwitz) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next 2/3] net: mdio: mdio-bcm-unimac: Poll for completion at 1us granularity Date: Sun, 15 Nov 2026 19:51:55 +0100 Organization: Usenet Network Message-ID: <6372266a7e2f7ebd83bbaf75056ce1ea@tipi-net.de> References: <20261113211554.2058181-1-florian.fainelli@broadcom.com> <20261113211554.2058181-3-florian.fainelli@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="1876915"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:2GAeIafkT9XHPU5u3lKpEgx8pGA= sha256:hh9I3twuajsamfuU3F+qZiYGt+ywzr8aCjzMfS1R5Ro= sha1:4iSOX+IBTZnWM4tyj0e28fyFucY= sha256:ZPdaDvRxu5QA+pghyKSr91PquKQ7UwlxPRcFNEE395Q= 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 4CBE7114A34; Sun, 15 Nov 2026 21:52:17 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.051 X-Spam-Status: No, score=-3.051 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] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=tipi-net.de 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 mggpBIJu21te; Sun, 15 Nov 2026 21:52:14 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-363799-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=tipi-net.de X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id B4A65114A23; Sun, 15 Nov 2026 21:52:04 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id 57372259BA; Sun, 15 Nov 2026 18:52:00 +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=1794768719; b=DUS5NUzSHuH1Un1jUgIxQD387Dv4uC0Q1e0wbafB//8I0nn7ckVyuTw/4KmHXA9hQkyf h2hxiL7yDw3di7s5y9XOZ9FPAY15+oRsfJxAqGIU1o2B+WN6p4w6xMQ04RcqiaF7PoCKx AV3XYjH/ujE7vwsc4YCRRA9aZ4WQGraA1inGYdmxv34pAqx/rv3/rwVcYko6rkxQ73G88 zF+awZv+ozHptZV6V4q1g4EWBXIGIAdQv2vb6W7y93GqFgdGNKnlI92CGOMRxruqZSxdh fy+f3NC1+JkkloYwCag0lyzDJ28wWt8IGp2tffr5zPfLqPV2sKZPMWEGkKhPVBiDf1g== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794768719; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Date:From:To:Cc: Subject:In-Reply-To:References:Message-ID:X-Sender:Content-Type: Content-Transfer-Encoding:X-Last-TLS-Session-Version; bh=TX1RY3u91alVrnKBjY7XHoRmEpFzQEPO5YB4TC0t61A=; b=jx+K6g11I3NgrKWqSc3yOxkPtaBhormo0Unz1H0uanKRwnO6jm0g+SDkVX9LvDpKBiYt LtFSxZ6W7fre06p8PibEEcZrLApC5fK3xYqzdAiFPXc+iGJhQDIFKczAk108o4mX1kzV/ aLNGmt25UWnjANmjRUGXqTDZmTIzIKlRle5fzyNdRt0yV1r3JEUEM5GLblkFD4L4m+04o PZs+9HKFMrup060CdjWfWSDFvfrECOdXkWWV/LB8xJEV0YbITT4By+NIRrUAQocmtA4xh d5wFuF31pgqVbF1kPIxGecPFmEoTJLiBM5ddD14hVLz5rFZ4OINOvMHfX1/q9QkSgbA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=fSYmeqqC; dmarc=none header.from=tipi-net.de; spf=pass smtp.mailfrom=tipi-net.de; 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 3FBDD606A331; Sun, 15 Nov 2026 18:51:59 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=fSYmeqqC X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=194.13.80.246 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794768718; b=GQ4ccZGwRg6LocEfSZtUEyge60I3Jsw72UHO7bygQcGNK3Yx+jJSz/VCK9SmhjXTQOwA xatA8f2RSbqE4jCga4azJ2Zi12qsV4pc6V3nFQkoUQaA0Q6ttxqQkm5HWgEDnHqc1+1Aj GbcHafX+UfuX8MYo6GLBm96S0lTjMP/cQLor3nwFd23ZRmO6NbdKavtGZmLh6aESnsWCx CgUJL589kNtuPCTWa+ILQJSxZHXt3vpawkcwuNk90y8Oei3hq6I516DaWuQuj9EtxOc4z gxv6TCp7JIF8fh4h9zXx1wkNSY5OQVOE0dB2dNrjGXIAaPBHM4Jh/veRFf2BssGyrLw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794768718; h=DMARC-Filter:Received:DKIM-Signature:MIME-Version:Date:From:To:Cc: Subject:In-Reply-To:References:Message-ID:X-Sender:Content-Type: Content-Transfer-Encoding:X-Last-TLS-Session-Version; bh=TX1RY3u91alVrnKBjY7XHoRmEpFzQEPO5YB4TC0t61A=; b=xXtI4NaaZ6/g3kI4954OWWPUyY7mBce4EyWKyBSff3fH5PImnlbExjqy9ImeyNgr1/Lf xIluAOioyU2lpy/68KrhlVZ07pAz9c8w1rJfB2jWPIm/4S57ZdCR6wUAVI3xoxiXwS3GT pleof1ujdi4MGBujZl31GeZBIbzVpGiYMAdC5uNFyx9T7ER6UkU0p9r0iqC04TvmRx9i3 +v/dvUEexB1gNgcmi7jUoH8kb7CKnvBJb8R4+p1ZzWqyWbGhc+S5QsRM6YzjgzB+tCCxY W6sP9WomaekqOfeQvk6lkbGLl3FdupzJAP/UL1ACi+JTpjMWUoj1dCaKWFfjV8W6Rcg== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=tipi-net.de; spf=pass smtp.mailfrom=tipi-net.de; dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=fSYmeqqC; arc=none smtp.remote-ip=194.13.80.246 X-Received: from mail.tipi-net.de (mail.tipi-net.de [194.13.80.246]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E7159606A327; Sun, 15 Nov 2026 18:51:57 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E7159606A327 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tipi-net.de X-Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 29249A167E; Sun, 15 Nov 2026 19:51:55 +0100 (CET) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim; t=1794768715; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=TX1RY3u91alVrnKBjY7XHoRmEpFzQEPO5YB4TC0t61A=; b=fSYmeqqCt3VYHOr3AIfeGwVQjLlDBZpezG6lbP9hBnJdfRyh79BOIAM462nRH4Pq4pHS8D irH/MZ1eXnv2V2WTg+9azW8zMZWVWZEg5dSwJ3HMBJMjx+OCZ4jmDOe8wH+F8XB2HEEtqB pJhq6WG/bEnKNZ7TpPF/LzyjKN+lPfVKk0kHTWWGLALK79XxGl0hSnere771XB4haid1I8 5odCUW4kV+xvfoeBNQ1+RypU66ZlxlBDjV7YaRN2DvHa/hUwBEtbSEZmndkteydtc4vswv dcrsl9YV0mgwVEIyi2EgangmaWfLC1Jxpa/nlxC8jDIISHPcrusIeyEVGNYedQ== 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-Cc: netdev@vger.kernel.org, Carlos Soto <carlos.soto@broadcom.com>, Doug Berger <opendmb@gmail.com>, Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>, Andrew Lunn <andrew@lunn.ch>, 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>, linux-kernel@vger.kernel.org, Mlody12 mlody12 <kudzo51@gmail.com> X-In-Reply-To: <20261113211554.2058181-3-florian.fainelli@broadcom.com> X-Sender: nb@tipi-net.de X-Last-TLS-Session-Version: TLSv1.3