Article View: linux.kernel.netdev
Article #19129Re: [PATCH net-next v7 1/3] net: macb: cache ENST config across link down/up
From: Nicolai Buchwitz
Date: Thu, 19 Nov 2026 11:49
Date: Thu, 19 Nov 2026 11:49
36 lines
10396 bytes
10396 bytes
On 18.11.2026 21:53, Théo Lebrun wrote: > Currently, ENST is not explicitly restored across interface close/open. > If HW keeps its register state then ENST is kept, otherwise it is lost; > but we do not write the ENST schedule again on open. > > This causes trouble if the config is not compatible with the new open > and link-up. The two issues that can occur are a link speed change (as > all timings are configured in a unit relative to the link speed) or a > change in the # of queues. > > The latter is the main reason we do this change before implementing > ethtool -L support. > > If on link-up, the cached ENST config is invalid (link speed changed), > then we drop the cached config, log a warning and explicitly override > all ENST timings previously configured in the registers. If it is > valid, we explicitly re-apply it. > > Take this opportunity to replace a kmalloc in > macb_taprio_setup_replace() with a simple and tiny (104b) stack value. > > Drop the old hack of checking for pm_runtime_suspended(), which has > little value because we could race with the runtime_suspend() call. > > Synchronise our config using the existing bp->mac_cfg_lock mutex, taken > by macb_taprio_setup_replace() and macb_taprio_destroy(). To avoid an > ABBA deadlock between bp->mac_cfg_lock and phydev->lock taken by > phylink_ethtool_ksettings_get(), cache the link speed as > bp->speed_mbps. > > Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com> > [...] Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>
Technical Details
Message-ID:
<b8bbd8e8078d9c27ccfaad2ac5001e42@tipi-net.de>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-366985-linux-kernel-netdev=dewy.ruReferences:
<20261118-macb-set-channels-v7-0-2dbc00f686af@bootlin.com> <20261118-macb-set-channels-v7-1-2dbc00f686af@bootlin.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-366985-linux-kernel-netdev=dewy.ru From: nb@tipi-net.de (Nicolai Buchwitz) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v7 1/3] net: macb: cache ENST config across link down/up Date: Thu, 19 Nov 2026 12:49:44 +0100 Organization: Usenet Network Message-ID: <b8bbd8e8078d9c27ccfaad2ac5001e42@tipi-net.de> References: <20261118-macb-set-channels-v7-0-2dbc00f686af@bootlin.com> <20261118-macb-set-channels-v7-1-2dbc00f686af@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2863414"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:L4lIyL7ZQdv9etyVqhN7XYgdQG0= sha256:g8J3Ji1RsUpK3Tf9s1KiN+Mj3qSd5joy9PPS721oyms= sha1:hAk8hR3uSbhbLrQCcI8SJSQY7EE= sha256:pNw+aaXDKnAigY3e39pDwJu2pR8Dj+g0GKiFQe69Ybw= 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 33743115605; Thu, 19 Nov 2026 14:50:32 +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 (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 8W8OdZSqjWv4; Thu, 19 Nov 2026 14:50:21 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-366985-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 021D3115558; Thu, 19 Nov 2026 14:50:11 +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 AED711E361C; Thu, 19 Nov 2026 11:50:04 +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=1795088993; b=5SDUWO1/dN+raPI+Gt1lawvOsZDzyuGTF1CByaGJEf1rUFmVScZZ4x5BcmWg5BJjKCo1 Ax71WxWkfosOC14gI/07zuoaH1DcnuJD7AR3ix0mwJ16tsTWW7ZkNRgckpUMaGNvgt8Sb jemcHOMxhDmCHd/m1QXa1CbOkzvmchISL2fY+kcDHTkogwX2TElvHRDZoIXctW7RgaWds woXNq8Sxu/vslZZ280VcJ1OKbE4Ib1CE4PQTLRZQib+eSHiI3oXlNILn8jfkIpWwKK4o5 MZR6CTODZa56a6dR1Ff7PIYVCvl0Qr0KxzXrdV5zk3pryAtBFO893UeJ8jDGHKTDJCQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795088993; 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=O95fuT/hByszdcGnSYNlRTqiDcHHAEJOmaLksYsfbos=; b=i823njxLMJdIhRi6+JbREjMW7u+4goupZI1bDMCJ2oOY0ayVRHtH2hxP665/tZ4wpucm uNUeUnyELa1Mlh+ZdbmtzZxeTMAEU85Xq2PFzF8xyzAhcopvzLqS1jFzpx2whZ1kmwXr6 h1BijzKmwuK43QdiBYYihim8oXauJWveLogjargpr/R/r8zLfsfRYomDH5auBpgqC/fXB vEEW9MbvYNsBfYyeu3s5YK8EI4rhu9x4BxCUNVowc89QbNBs6MV8/mxr5hRnq7YgqDj45 zU+5kBSvJbtXrJ4dH9PHZPK4LgEKNfLcun36LIrRiNZlfAPliBZfMSZPQgrLl5kJ/Dw== 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=hpPLAHSC; 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 C13EC606A32F; Thu, 19 Nov 2026 11:49:53 +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=hpPLAHSC 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=1795088988; b=L9hpShlbqa15TCtMzjEJytuT7CzHgQurUOpnzUHYZyMDBFR8y5OuJ/gCqziOMUNDmMWK xahVg6E29Gxtu2NUHwNoYQLBYGSwrm6NL0EZzqFr4NRZt4ieJrYvO3hpI8zVxqXMshhsU 9GqrinfC6wBNC7NnJ7Vk9QlV9yxQu6F/QD4PufeG+WeQhSBz7/vqJ/jqFPZKWjx2KchAO lPzzLShVaKV/vXdByL8RjLkQW8wAY+7J9ycYPDT9lhoJki6fqS0Lz6cAilDaX5SQ0Sk6T DFS/3eJBytVNE6xgGct4QVPr2DEcLF9ItFvdoOMpH7NGZAycOBCO0u60vk+xe0j0q+A== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795088988; 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=O95fuT/hByszdcGnSYNlRTqiDcHHAEJOmaLksYsfbos=; b=bWKIvSXjgzdxjKZelwPf+HuBISxh/p+UFX0QCtufuJe/nurjjjC6AEISjFlv/ZhpTv5k zVMEdQ7JVWK43lyIMgf69z564KMZacbLxhpe8aOTISub0rEBhLHKXwyaq1AdL63WGcVbB p6NrQT0FyQXHnYAYKmErUD4AS+iclF3/c6xEQ1rmmWpLbQfP4k0dNCiCVq5ryClGqLQZq cCgM/cdu5iZWNpQs8NE5uxdTsI2rh/VRR2BvpJf4J1mMcelE8OdU9WH81NqWg9MxaNz7/ i0ZlNCTSWpv4xWPN0Cj9oqbHwYL34s3A8QxY8WIgPTaGx/Oja8R+JOjwqOgBTauwbCw== 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=hpPLAHSC; 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 6E65E606A32C; Thu, 19 Nov 2026 11:49:47 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6E65E606A32C 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 716C5A11AF; Thu, 19 Nov 2026 12:49:44 +0100 (CET) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim; t=1795088985; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=O95fuT/hByszdcGnSYNlRTqiDcHHAEJOmaLksYsfbos=; b=hpPLAHSCrwQrSD/G9ycqd7DIsbzUmIBurKWCe5HUcdwHWd5UmFONwGcHn4IRbgUR2Weg8O qU38EH6hf2xOBL468Kbs0YIosp6SUY2GPGIN9zGrWvIflxG/RmdDJZJoT5eeG6e0uFQLe7 OxjHJAN50uQWRmHiQ34Kf4+8wVzd4q7/dtM3IgEIudSMkPWFgM2gcF+RC+lTqqknu1xPI3 koxE7iuR1NL62txT1zuslBcEnkjwlVDVpwKWPHrwBe0Hl7p2gCfNRymwp+iHYTk4aB8k0Z CxiRfSdawDI+M5WNa3U3cI5ar2kC1UTNJWBo4nONt2LbcKpyaT59/HsqEP1C7Q== 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: Conor Dooley <conor.dooley@microchip.com>, Andrew Lunn <andrew+netdev@lunn.ch>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Russell King <linux@armlinux.org.uk>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Paolo Valerio <pvalerio@redhat.com>, Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>, Gregory CLEMENT <gregory.clement@bootlin.com>, Benoît Monin <benoit.monin@bootlin.com>, Tawfik Bayouk <tawfik.bayouk@mobileye.com>, Thomas Petazzoni <thomas.petazzoni@bootlin.com> X-In-Reply-To: <20261118-macb-set-channels-v7-1-2dbc00f686af@bootlin.com> X-Sender: nb@tipi-net.de X-Last-TLS-Session-Version: TLSv1.3