[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Sat, 4 Apr 2020 23:34:30 +0800
From: Chuanhong Guo <gch981213@...il.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: René van Dorst <opensource@...rst.com>,
netdev@...r.kernel.org, stable@...r.kernel.org,
Sean Wang <sean.wang@...iatek.com>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Matthias Brugger <matthias.bgg@...il.com>,
Russell King <rmk+kernel@...linux.org.uk>,
"moderated list:ARM/Mediatek SoC support"
<linux-arm-kernel@...ts.infradead.org>,
linux-mediatek@...ts.infradead.org,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: dsa: mt7530: fix null pointer dereferencing in port5 setup
Hi!
On Sat, Apr 4, 2020 at 11:08 PM Andrew Lunn <andrew@...n.ch> wrote:
> > > MT7530 tries to detect if 2nd GMAC is using a phy with phy-address 0 or 4.
> >
> > What if the 2nd GMAC connects to an external PHY on address 0 on a
> > different mdio-bus?
>
> In general, you using a phy-handle to cover such a situation. If there
> is a phy-handle, just use it.
If it's determining where switch mac5 is wired, a phy-handle is fine.
Here we are determining where exposed rgmii2 pins are wired.
It can be wired to switch mac5 or skip the switch mac completely
and connected to phy0/phy4.
Current driver is determining rgmii2 wiring on mt7530 using phy-handle
on *another unrelated ethernet node* which doesn't sound right.
--
Regards,
Chuanhong Guo
Powered by blists - more mailing lists