🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #8105

Re: [PATCH v3 5/7] net: dsa: mediatek: support MDIO switch downstream of MMIO switch

#8105
From: Andrew Lunn
Date: Wed, 28 Oct 2026 02:20
22 lines
9442 bytes
On Wed, Oct 28, 2026 at 01:13:15AM +0000, Caleb James DeLisle wrote:
> The MT7530 / MT7531 can connect via either MDIO or MMIO. In MMIO mode
> the switch provides its own MDIO bus which connects to its integrated
> PHYs, but also can be connected to other things, such as another
> switch.
> 
> If the MDIO bus contains another switch, then the upstream switch
> will register but it will not setup the DSA tree because the
> downstream switch is missing. Without the complete DSA tree,
> mt753x_setup() will not be called on the switch and therefore
> mt7530_setup_mdio() is never called so the downstream switch never
> registers.
> 
> Update mt7530_setup_mdio() so that it can be called multiple times,
> export the symbol, and call it again after dsa_register_switch()
> from mt7988_probe().

I would suggest just moving it to probe. Don't also have it in setup.
KISS.

	Andrew
Technical Details
Message-ID: <f6fe9c7a-5617-475b-babe-da24cda815cc@lunn.ch>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352702-linux-kernel-netdev=dewy.ru
References: <20261028011317.1557238-1-cjd@cjdns.fr> <20261028011317.1557238-6-cjd@cjdns.fr>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352702-linux-kernel-netdev=dewy.ru
From: andrew@lunn.ch (Andrew Lunn)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH v3 5/7] net: dsa: mediatek: support MDIO switch
 downstream of MMIO switch
Date: Wed, 28 Oct 2026 03:20:34 +0100
Organization: Usenet Network
Message-ID: <f6fe9c7a-5617-475b-babe-da24cda815cc@lunn.ch>
References: <20261028011317.1557238-1-cjd@cjdns.fr>
 <20261028011317.1557238-6-cjd@cjdns.fr>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="1683522"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:w32ddQ0wJKSFucyV+SLPoKe5gzI= sha256:UyDo/HlKQPYyOIZeCDpdnwWOtjZoB9Q+wmGG3WI5W5k=
	sha1:gDGMBRWZTWNi6g1yCBshrA1lj6o= sha256:7CqbCzZYW+/ckH6JjNkhZXpC5G+JNGEedrlFb/6KeQE=
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 918B8125C29; Wed, 28 Oct 2026 05:21:15 +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.25,
	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 (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 i4Lsn99vCMnr;
	Wed, 28 Oct 2026 05:21:08 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-352702-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 7E353125C25; Wed, 28 Oct 2026 05:20:59 +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 7C7C22B954; Wed, 28 Oct 2026 02:20: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=1793154054;
	b=UpQX63dx1dqO9MHIi5qcPZM7jVn9ZCM28y640cQHxIFzOLfd9pHDH5l0e+x8UwQahm/m
	 1Fhuvh/ZTbHr0h06XAFrXV0LPBk3vS/nflT6U9b7cjrwCBil5OtZHu5OcsRZx3kdGt7PG
	 wSqvfI/kesyolpe7U0WZ1AZYz5S3B+7TMlYF9zsjRSNhNs4RJy1Zm0c60xf35xYzZ/aOJ
	 ngadMT4CFLQpLHkorrRzGTEUN4fd1UB/VZXYPhGQgqhcgbprqDzKMI/a0ye1mbYhlLVd+
	 ULJCvW0ogoYWItB6jsoRcOzrRgZoSOtO/4ggtVtj5Ng5xcWi80/HIqPhBPngFBJDiTA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793154054;
	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=fR07HzCYiHUWXoygEK4KE/KCkYYrHs4rlMJZsk/rRdk=;
	b=lyQtF2hlDifS1ZD8C0fFDqpWNv5DjNdsgJtNDowxVuxNtnJjtIKUnWeJjm7nfKWPxU3d
	 RGOxj1VUZqzPf8ZYX2G7NBpoq4MHYqpWxdo2sUHMxOmOABG1DC2/L0EqFYfkX5mRubqQF
	 tRSHlaEB+Hf64AxrGi30hTJy1ZTojRj8wquxY73JmE6B0wW1sHdW+rjHfBrBMhi9akOeZ
	 gkh3xWczjfEC1Df9mzkwOwfJNn7Ufj9czMa4F4jSqTMFl5PENRsDaKPyT9c0iUlR/78xW
	 l4iTkqQLyWJDDseZzLU/iMuUNUMtl3muI86s7scHRyY02DXfU0HQIN0P+bKJfDf74Cw==
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=Q4dEGGKV;
	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 53D04606A324;
	Wed, 28 Oct 2026 02:20:54 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=Q4dEGGKV
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=1793154053;
	b=Q5YIqUYY5JRivdAI51h/iHdw/4IGe3ZGT2H8gabbOCeEgiHDSEG+KGY6pcYrc3X1uZVv
	 mxDRr2ILUxsPYF2r8FO4rdiZZKnOxq99FKWJPz2LLDT4mrQLbLcNYGwrd6hGE7Rtjm+GP
	 Hniw8gkiyFErdqtKGCJ6cZx9YG/z23jV/1IA9uXKMN+VQVNim5T3hbG7waiS2X1sa1B9x
	 YNqyYK3Z9hEexVjRMdx5hAHlNT5M/bWJIt5vBebFp7DKkGlsY0Atsb0IFeDyIUeQZcX/S
	 3zFIy4HqiLFWdE9Oy+W2lGB4hL9mUmGtF5MEsTM+vtfD//Qj/z0jlQGhwI4d4RzllDA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793154053;
	h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject:
	 Message-ID:References:MIME-Version:Content-Type:Content-Disposition:
	 In-Reply-To;
	bh=fR07HzCYiHUWXoygEK4KE/KCkYYrHs4rlMJZsk/rRdk=;
	b=Uja//Kn1J4b7Yq1N0dkGYqteJE3DR2eZlBkMR3KDrE7wNMPhCpo0kuahVjOy+ddlIyzr
	 oE5HynzJzAa+EMNt6SYBaCPsoBMfpxXKgaWaRAIvAc9xcoQUPmZDhYTRKyapLqJr8ZsCi
	 VHgWSUi5tahAI6ruzgsIdFKZZoA02Qy11477RCmfxxndqCzVLmUOsrSto4ym45voCtiWb
	 GBquI/R7cSn60kufG9LZD0hTZiY5dc0vyNzjgsSbz6cjkqfIXoiSDTjO4sgXnVEU5CeBS
	 dRP04WA3TwQyYNLbWORNACDB8dC158+8IhUrID5gKW6/qPZ9XnRyBW0iX5m/Gt/eWwQ==
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=Q4dEGGKV;
	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 F3845606A31A;
	Wed, 28 Oct 2026 02:20:52 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org F3845606A31A
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=fR07HzCYiHUWXoygEK4KE/KCkYYrHs4rlMJZsk/rRdk=; b=Q4dEGGKVey53CbOf9pJ4D+Qgeu
	+LuZKwfaRnJ/Mnxr3h9OLDa1i9BLVJvt1ZYkxMn4nXsO66nFT0/3fxs9bITdm4hIg2Dj2haphPyBx
	0PvrEXVIKaXT1C0Up8iWyweRQ9dbZ5v9QVACNXM05HfQreaS5mLiWv4esqheyvYDgqqQ=;
X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2)
	(envelope-from <andrew@lunn.ch>)
	id 1xLtHG-00D2pX-Ip; Wed, 28 Oct 2026 03:20:34 +0100
X-Cc: netdev@vger.kernel.org, olteanv@gmail.com, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com,
	chester.a.unal@arinc9.com, daniel@makrotopia.org,
	linux@armlinux.org.uk, arinc.unal@arinc9.com,
	Landen.Chao@mediatek.com, dqfext@gmail.com, sean.wang@mediatek.com,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, naseefkm@gmail.com,
	b.larsson@gmx.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: <20261028011317.1557238-6-cjd@cjdns.fr>