Article View: linux.kernel.netdev
Article #16685Re: [EXTERNAL] [PATCH net] net: marvell: prestera: disable port before changing its MAC mode
From: "Imre Kaloz"
Date: Sun, 15 Nov 2026 15:41
Date: Sun, 15 Nov 2026 15:41
33 lines
11421 bytes
11421 bytes
Hi Elad, On Sun, Nov 15, 2026, at 08:32, Elad Nachman wrote: <snip> >> Thanks. I looked at prestera_hw_port_phy_mode_get(): it only maps the >> firmware's mdix byte to ETH_TP_MDI/MDI_X/AUTO, anything else becoming >> ETH_TP_MDI_INVALID, and the driver never calls it for SFP ports (the >> sfp-52 port goes through phylink and the MAC mode attribute only). >> >> Two things the code cannot tell me: which mdix value does the firmware >> report while the port is admin down (INVALID?), and does that attribute > > I have managed to find the specific PHY type for TN48M. > At least for this specific board, it will not report invalid MDI/MDI-X mode. > >> carry anything for an SFP port in SGMII mode with a copper module, where >> the PHY sits in the module? > > This API only works for Marvell PHYs. If you have a Marvell PHY at the end of > The copper module, I think it should be relevant. Thanks for checking. Then the mdix status cannot tell me when the port is down on TN48M, and v2 keeps the disable without a delay; the port came up on every boot without one here. If you know a device or firmware version where the reconfiguration fails without the delay, I can add a bounded wait for that case. Thanks, Imre
Technical Details
Message-ID:
<5a2797d4-b3c8-43a9-a3bc-9a0928c87b39@app.fastmail.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363742-linux-kernel-netdev=dewy.ruReferences:
<20261111101521.9878-1-kaloz@kernel.org> <BL1PPFB0715B38BE2E57548F95CCBDFCAF7DB712@BL1PPFB0715B38B.namprd18.prod.outlook.com> <02e94b70-d446-4518-8f7a-c0f710e3b572@app.fastmail.com> <PH3PPFA2D0C836CFB7D296376875E16ECC8DB702@PH3PPFA2D0C836C.namprd18.prod.outlook.com> <a09fdc30-cd05-416a-8ca4-9787340fb6c3@app.fastmail.com> <BL1PPFB0715B38BF7C2E60F8CA62C66A205DB7D2@BL1PPFB0715B38B.namprd18.prod.outlook.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363742-linux-kernel-netdev=dewy.ru
From: kaloz@kernel.org ("Imre Kaloz")
Newsgroups: linux.kernel.netdev
Subject: Re: [EXTERNAL] [PATCH net] net: marvell: prestera: disable port before
changing its MAC mode
Date: Sun, 15 Nov 2026 16:41:41 +0100
Organization: Usenet Network
Message-ID: <5a2797d4-b3c8-43a9-a3bc-9a0928c87b39@app.fastmail.com>
References: <20261111101521.9878-1-kaloz@kernel.org>
<BL1PPFB0715B38BE2E57548F95CCBDFCAF7DB712@BL1PPFB0715B38B.namprd18.prod.outlook.com>
<02e94b70-d446-4518-8f7a-c0f710e3b572@app.fastmail.com>
<PH3PPFA2D0C836CFB7D296376875E16ECC8DB702@PH3PPFA2D0C836C.namprd18.prod.outlook.com>
<a09fdc30-cd05-416a-8ca4-9787340fb6c3@app.fastmail.com>
<BL1PPFB0715B38BF7C2E60F8CA62C66A205DB7D2@BL1PPFB0715B38B.namprd18.prod.outlook.com>
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
logging-data="1840387"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:bs73IE3P3R3GCkTTNyJkzzrc9TQ= sha256:z9Wapi1SdKlKyyvuDxBknzxdTGtqbSIzdOX8LTdVxkc=
sha1:enSsAq4u6iIE9pTloX1vJvwaqWI= sha256:59RqT8Oligr1SpsgUbHkkTd8o4pynlyq64gdY/uHErA=
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 082251149F7; Sun, 15 Nov 2026 18:42:30 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
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=kernel.org
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 cX8AIaU-oE-u;
Sun, 15 Nov 2026 18:42:26 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-363742-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
by mail.dewy.ru (Postfix) with ESMTPS id 4BD1D1149F8; Sun, 15 Nov 2026 18:42:18 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by tor.lore.kernel.org (Postfix) with ESMTP id C63F83318A; Sun, 15 Nov 2026 15:42:16 +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=1794757336;
b=DAyndt9us3BXMek2WQZfrPxcULDl9/IlmS9qusjm0Rp4zTQkoT2L41IALxQ51CsRE0c3
QzmZZZ8CHWjodmpvDwuH/niBg6N4EBuFAP0JA+swuvfnrf+qC3HAfqR4vKQ3pnKWYwtix
pIPG7Alazuvliz4jm3w2VC8kWz2gQl2uXCwBgtkRsM+eziNB8Uyke8BiiRhI6If8NntkI
zUeNfzTvW1jvhfqf1U6a0kolWuwc02w2nIqXzM7c6E8T0CFnfQyH4Lf57Tm28Z9RUTg8H
Zt3tjp4kkq+bonOEahT1xXZnDXdyJxjeDW3sr4PyB4es5v8JEI87H3SWN3gNdxdIm9Q==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794757336;
h=X-Original-To:Received:Received:DKIM-Signature:Received:Received:
X-ME-Sender:X-ME-Proxy-Cause:X-ME-Proxy:Feedback-ID:Received:X-Mailer:
X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version:X-ThreadId:Date:
From:To:Cc:Message-Id:In-Reply-To:References:Subject:Content-Type:
Content-Transfer-Encoding;
bh=MbrJBmdcvX5OLSxudu7WhNNkW+2JP0bJchyleihhn/k=;
b=SKwo64kPXxC3Z+UFICZ8FaTMPC5Uz23oTmDsZIOcPWCPyryZQcDB55O0RbXPrSBjn9j6
BkzxQUJ/DDx+Xj1DSLaIp6AZFeHaBULQYdJG24vPqiKm+xnoBgqhoiCavGKKJOq+wJROE
nqucnFE8oS776etQUN6hqzHyqJCBAQyksHo32DDIpmGlSX+xUqs5vfxtdZ697FOuX8Aga
WnnE+dmrXe0LyXT10ZKOxfAeaKpulh5yySdtrslvxYyY9zgOHe0q9Rdd4dH0P+wTlkSW2
RXhDLaxxB8OUYXMsVlTdcX2oP+TqnX9cRiPwLTUVrHtIjTVwfGzq9ryOmXyFJ2GD+bg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=WgZx4q+I;
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 7EE87606A31E;
Sun, 15 Nov 2026 15:42:16 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=WgZx4q+I
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1794757335;
b=tM166LVbY+ZxTQ+fQ4y2/hmczEP9IoNKsSyhVblEnOVu78lmhoYIszIi4i0yOXgHqbsc
cfmpPfOUB/J7zBifqtVrKVgWtaiDi7j8KGc59Zmu0iPY0yTVSwUSvwhgVqDGeWmQr4Id9
2Mu7XCSskrHcBF74J1rvI8Aue9B8e2AKBPohysLSJARmh7DoWZvSuj17JLHAg90uormMU
mP5Sca1TwUwXG8L4h/FFz9YetmGiViIJ4bg8N1QwEySy0Qs3P+pPUrf5iri/KKDkaRUjX
gTPiWmdMrA2mAFZXTMpFBe//YGSX6vxnTLj149+f0AuC6VwVzHEGubnGZmacQQkZFFg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794757335;
h=Received:DKIM-Signature:Received:Received:X-ME-Sender:
X-ME-Proxy-Cause:X-ME-Proxy:Feedback-ID:Received:X-Mailer:
MIME-Version:X-ThreadId:Date:From:To:Cc:Message-Id:In-Reply-To:
References:Subject:Content-Type:Content-Transfer-Encoding;
bh=MbrJBmdcvX5OLSxudu7WhNNkW+2JP0bJchyleihhn/k=;
b=Fu0nCCGSyq91tO3KNbg33XKdGwldB2lzYiH4jrnIV1OnAQXnwja/6E5+ysUNwxTz1QkX
2xuVKhgdEOTPUqVLpoNHGVaZrh+KO0BrxolSEqKbzWz9PLyVNh9O5NbMwoFD/z4XVxwq/
naUvVTwfip3JzZhVFN9PG/QAp0tlw1sUdk14wJRRISMqf277/ZVmg96sdwUy8eCJddspz
I38zIwwBH1GA/FXbszuk3I69H8M/1EU33bN7PKD6AIjGNftxsNYSjLg4lHB9NZBeEa1Rw
orAv4aPjec+aOakJnvwiF1AzYruhax7KFUSt2blYHwf5G84UCtLsTXvsN0ix6RhDOhg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=WgZx4q+I;
arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
(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 9BE12606A31A
for <netdev@vger.kernel.org>; Sun, 15 Nov 2026 15:42:15 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA4CF1F000C6;
Sun, 15 Nov 2026 15:42:14 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
s=k20260515; t=1794757335;
bh=MbrJBmdcvX5OLSxudu7WhNNkW+2JP0bJchyleihhn/k=;
h=Date:From:To:Cc:In-Reply-To:References:Subject;
b=WgZx4q+IC9DWIQBD2seqrKktGecAgL/GOCGOSkzD4TIQzc0wp/s/Ua0Q2KrPaxTZD
B7bSi0eMkin3jVsfUQEaPnU1t/heZAYxyNxPOpURWiIKZQ7kemGmEm3Xg/CPE4lUiU
3KexFe/KGNb8z2X9rnhWsZx8ZY0vy22nUND7n0PYC3ImzYBjfyG78+xFJ1OwFLvjIZ
U9rVG12JjoPms4vJuIky4teOGL3t6NhFt+iHaEY9imP1zKowdnragjE39PabIuU6+d
HBcz+QFuekqXcsySGf4cFRJcgRMy53FGKyx7M+2PXK36+ZnmgxbnaEXseSxnIwsBng
9hOl/DfQYn2XA==
X-Received: from ams-compute-01.internal (ams-compute-01.internal [10.64.2.61])
by mailfauth.ams.internal (Postfix) with ESMTP id 01437198003A;
Sun, 15 Nov 2026 10:42:12 -0500 (EST)
X-Received: from ams-imap-19 ([10.64.2.39])
by ams-compute-01.internal (MEProxy); Sun, 15 Nov 2026 10:42:13 -0500
X-ME-Sender: <xms:09L5ajDz7tY9-Usgdml6kq0493zmgMfUllpU1k5gcfifaaA3Rs8s4A>
<xme:09L5akV_Cd4CLn7Wq5UgafH2J5mYFBgeoPmtk1xeZV42xTOeAfRoaUkK_JXC9XeMm
KzG803dth_DQi8ej-Jgz6HVnODv2BNyiyMTJH0G_e8bPkWxoxUJk3SMzQ>
X-ME-Proxy-Cause: dmFkZTEmenXVIFofZc3ClLv6Sq/Z4JPbJ5gXxLBg3M4TxqdLK4zLcuLlCWPeYQYzbADznO
3boPBawF75Uq+8T6vEuiuev184XSJmEvYP7y0T2ID6Mu1h4cO2VBErGpPZVzLKQ+aEEENx
Njsn+B+0Y+SWnCUSZDBLBppq7SfiI9VKY1JUtR5etSBGE0A5PpUFuNzNn698ApLykTuYF5
RPqetwhObmW01FtZ2tvE5kXmDntGCXI5GJynG/233IKAn0/62+9c0liRK6mJ7v74yYWYuV
f2MQDQw6UASabHpVoKA79aMTA9sUgjv4bTSkDjNsHerPb26fiOW0TZWVWWQYa5TESpdqif
hToGSoVMvivLdZqboLDzPQPnY6K0QWyIXGLWzkocjSzqxrvM668y8oWKwX3cL3CIgDRhd4
qElb2uktS+UsVuYD5UUt53TSswPnnzqaK3PnPdBGBcQPzN6GL4ggXxLKJOnjFUQfAjfmt/
UF3GYADAuDSRJBAmO1VnXRi43/2U04F7C95Rg8/saQw/e2FanfgzkvdWoo+nvBFulovwz7
AD6AdON7JRxnl0vlJdfhF0OkKArtPqunLl5fYWCiWf+jmqSbqVjMOh50Qp1p7Av7kmQGbb
GJpnmpNeXicqiIcU15ahilplla7iSqMadFtyPEYnG8R52xraSzxKHG844zMg
X-ME-Proxy: <xmx:1NL5alWs15tOh4-bFsnsIjUJLf6fjeldf3i3tjkZ9jyUgk-GhvW7WQ>
<xmx:1NL5avnb7SiEbWR905s-hJMrZa0ouFtDe-ApG2TkdzPUkattGLr9TQ>
<xmx:1NL5aoDtsgAgj_7y9xpRWdYYDWQlyGendoFBdLAoyemh6wAqQfhh5Q>
<xmx:1NL5amgdSOCyFmXyzDJTnzxdQbvFpbFBf2g3JUD1gDDnPZU9e9IkEA>
<xmx:1NL5atxFwxfYbTHUkfdgRz71z7q8djQEF7ZO6U3fA1tC76ptMpUfTSmu>
X-Feedback-ID: ia3204a8f:Fastmail
X-Received: by mailuser.ams.internal (Postfix, from userid 501)
id 196712F8005A; Sun, 15 Nov 2026 10:42:11 -0500 (EST)
X-Mailer: MessagingEngine.com Webmail Interface
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-ThreadId: APqG7cBtEf9F
X-Cc: "David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@kernel.org>, "Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>, "Andrew Lunn" <andrew+netdev@lunn.ch>,
"Oleksandr Mazur" <oleksandr.mazur@plvision.eu>
X-In-Reply-To: <BL1PPFB0715B38BF7C2E60F8CA62C66A205DB7D2@BL1PPFB0715B38B.namprd18.prod.outlook.com>