From: Andrew Lunn <andrew@lunn.ch>
To: Vladimir Oltean <vladimir.oltean@nxp.com>,
Russell King <rmk+kernel@armlinux.org.uk>
Cc: netdev@vger.kernel.org, "Woojung Huh" <woojung.huh@microchip.com>,
UNGLinuxDriver@microchip.com,
"Vivien Didelot" <vivien.didelot@gmail.com>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"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>,
"Russell King" <linux@armlinux.org.uk>,
"Michael Grzeschik" <m.grzeschik@pengutronix.de>,
"Oleksij Rempel" <linux@rempel-privat.de>,
"Thorsten Leemhuis" <regressions@leemhuis.info>,
"Alvin Šipraga" <alsi@bang-olufsen.dk>,
"Rasmus Villemoes" <linux@rasmusvillemoes.dk>,
"Craig McQueen" <craig@mcqueen.id.au>
Subject: Re: [PATCH net] net: dsa: microchip: keep compatibility with device tree blobs with no phy-mode
Date: Thu, 18 Aug 2022 17:13:51 +0200 [thread overview]
Message-ID: <Yv5XL4KTLxukVhck@lunn.ch> (raw)
In-Reply-To: <20220818143250.2797111-1-vladimir.oltean@nxp.com>
> It is important to note that phy_device_create() initializes
> dev->interface = PHY_INTERFACE_MODE_GMII, and so, when we use
> phylink_create(PHY_INTERFACE_MODE_NA), no one will override this, and we
> will end up with a PHY_INTERFACE_MODE_GMII interface inherited from the
> PHY.
Is this actually a bug?
With pure phylib, you should call one of the connect functions, which
underneath calls phy_attach_direct() which has a phy_interface_t. So
the default in practice does not matter.
> All this means that in order to maintain compatibility with device tree
> blobs where the phy-mode property is missing, we need to allow the
> "gmii" phy-mode and treat it as "internal".
of_get_phy_mode() returns PHY_INTERFACE_MODE_NA if the property is
missing, which also suggests this is a bug.
I wonder if we have any ports which actually rely on
PHY_INTERFACE_MODE_GMII?
Andrew
next prev parent reply other threads:[~2022-08-18 15:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-18 14:32 [PATCH net] net: dsa: microchip: keep compatibility with device tree blobs with no phy-mode Vladimir Oltean
2022-08-18 15:06 ` Alvin Šipraga
2022-08-18 15:18 ` Vladimir Oltean
2022-08-18 15:25 ` Alvin Šipraga
2022-08-18 15:13 ` Andrew Lunn [this message]
2022-08-18 15:21 ` Vladimir Oltean
2022-08-18 15:33 ` Russell King (Oracle)
2022-08-19 10:19 ` Rasmus Villemoes
2022-08-19 10:57 ` Vladimir Oltean
2022-08-19 11:47 ` Rasmus Villemoes
2022-08-19 16:41 ` Vladimir Oltean
2022-08-22 20:11 ` Tim Harvey
2022-08-19 23:32 ` Jakub Kicinski
2022-08-20 11:24 ` Vladimir Oltean
2022-08-23 1:00 ` patchwork-bot+netdevbpf
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=Yv5XL4KTLxukVhck@lunn.ch \
--to=andrew@lunn.ch \
--cc=UNGLinuxDriver@microchip.com \
--cc=alsi@bang-olufsen.dk \
--cc=craig@mcqueen.id.au \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=linux@rasmusvillemoes.dk \
--cc=linux@rempel-privat.de \
--cc=m.grzeschik@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=regressions@leemhuis.info \
--cc=rmk+kernel@armlinux.org.uk \
--cc=vivien.didelot@gmail.com \
--cc=vladimir.oltean@nxp.com \
--cc=woojung.huh@microchip.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).