linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Golle <daniel@makrotopia.org>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: "Arınç ÜNAL" <arinc.unal@arinc9.com>,
	"DENG Qingfang" <dqfext@gmail.com>,
	"Sean Wang" <sean.wang@mediatek.com>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Vladimir Oltean" <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"Landen Chao" <Landen.Chao@mediatek.com>,
	"Frank Wunderlich" <linux@fw-web.de>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, regressions@lists.linux.dev
Subject: Re: [PATCH net v3] net: dsa: mt7530: fix impossible MDIO address and issue warning
Date: Thu, 4 Jul 2024 16:15:15 +0100	[thread overview]
Message-ID: <Zoa8gyhHZ41ByNll@makrotopia.org> (raw)
In-Reply-To: <5c92dcae-ec10-4652-a5e4-3f050774fc8b@gmail.com>

On Thu, Jul 04, 2024 at 04:46:29PM +0200, Florian Fainelli wrote:
> On 7/3/2024 12:44 AM, Daniel Golle wrote:
> > [...]
> > This is imporant also to not break compatibility with older Device Trees
> > as with commit 868ff5f4944a ("net: dsa: mt7530-mdio: read PHY address of
> > switch from device tree") the address in device tree will be taken into
> > account, while before it was hard-coded to 0x1f.
> > 
> > Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
> > Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> > ---
> > Only tested on BPi-R3 (with various deliberately broken DT) for now!
> 
> This seems like a whole lot of code just to auto-magically fix an issue that
> could be caught with a warning. I appreciate that most of these devices
> might be headless, and therefore having some attempt at getting functional
> networking goes a long way into allowing users to correct their mistakes.

My initial motivation was to preserve compatibility with existing broken
device trees.

I then had given up on it because nobody seemed to care, but have
resumed and completed the patch now that reverting the change taking the
address in DT into account became the only alternative.

In OpenWrt all device trees with broken switch MDIO address have been
fixed long ago... (and we always ship the DT along with the kernel, so
DT backward-compatibility doesn't play a role there)


      reply	other threads:[~2024-07-04 15:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-02 23:44 [PATCH net v3] net: dsa: mt7530: fix impossible MDIO address and issue warning Daniel Golle
2024-07-03  1:07 ` Andrew Lunn
2024-07-03  7:03 ` Arınç ÜNAL
2024-07-04 17:21   ` Vladimir Oltean
2024-07-04 18:19     ` Arınç ÜNAL
2024-07-04 18:52       ` Arınç ÜNAL
2024-07-04  2:13 ` Jakub Kicinski
2024-07-04 10:48   ` Daniel Golle
2024-07-04 14:16     ` Jakub Kicinski
2024-07-04 14:46 ` Florian Fainelli
2024-07-04 15:15   ` Daniel Golle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zoa8gyhHZ41ByNll@makrotopia.org \
    --to=daniel@makrotopia.org \
    --cc=Landen.Chao@mediatek.com \
    --cc=andrew@lunn.ch \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=arinc.unal@arinc9.com \
    --cc=davem@davemloft.net \
    --cc=dqfext@gmail.com \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux@fw-web.de \
    --cc=matthias.bgg@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=regressions@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=sean.wang@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).