From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Vladimir Oltean <olteanv@gmail.com>,
Woojung Huh <woojung.huh@microchip.com>,
Arun Ramadoss <arun.ramadoss@microchip.com>,
Conor Dooley <conor+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
kernel@pengutronix.de, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, UNGLinuxDriver@microchip.com,
"Russell King (Oracle)" <linux@armlinux.org.uk>,
devicetree@vger.kernel.org
Subject: Re: [PATCH net-next v1 5/5] net: dsa: microchip: add support for side MDIO interface in LAN937x
Date: Mon, 28 Oct 2024 14:43:07 +0100 [thread overview]
Message-ID: <Zx-U69erLsPBmtLw@pengutronix.de> (raw)
In-Reply-To: <20c0ed0f-712d-46d4-8a49-e92835f47f9e@lunn.ch>
On Mon, Oct 28, 2024 at 01:15:42PM +0100, Andrew Lunn wrote:
> > +static const u8 lan9370_phy_addr[] = {
> > + [0] = 2, /* Port 1, T1 AFE0 */
> > + [1] = 3, /* Port 2, T1 AFE1 */
> > + [2] = 5, /* Port 3, T1 AFE3 */
> > + [3] = 6, /* Port 4, T1 AFE4 */
> > + [4] = U8_MAX, /* Port 5, RGMII 2 */
> > +};
>
> I think it would be good to add a #define for U8_MAX which gives a
> hint at its meaning.
ack
> > + for (i = 0; i < dev->info->port_cnt; i++) {
> > + if (phy_addr_map[i] == U8_MAX)
> > + dev->phy_addr_map[i] = phy_addr_map[i];
> > + else
> > + dev->phy_addr_map[i] = phy_addr_map[i] + offset;
> > + }
>
> My first guess was that U8_MAX means the PHY is external, so could be
> on any address depending on strapping. Looking at this code, i'm not
> sure it does actually mean that.
Yes, the U8_MAX for ports without integrated PHYs. This code calculates address
for integrated PHYs, which can be different depending on strap
configuration.
I'll use some different define.
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2024-10-28 13:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-26 6:35 [PATCH net-next v1 0/5] Side MDIO Support for LAN937x Switches Oleksij Rempel
2024-10-26 6:35 ` [PATCH net-next v1 1/5] dt-bindings: net: dsa: ksz: add internal MDIO bus description Oleksij Rempel
2024-10-27 23:04 ` Rob Herring (Arm)
2024-10-28 12:09 ` Andrew Lunn
2024-10-26 6:35 ` [PATCH net-next v1 2/5] dt-bindings: net: dsa: ksz: add mdio-parent-bus property for internal MDIO Oleksij Rempel
2024-10-27 23:06 ` Rob Herring (Arm)
2024-10-28 12:09 ` Andrew Lunn
2024-10-26 6:35 ` [PATCH net-next v1 3/5] net: dsa: microchip: Refactor MDIO handling for side MDIO access Oleksij Rempel
2024-10-28 12:08 ` Andrew Lunn
2024-10-26 6:35 ` [PATCH net-next v1 4/5] net: dsa: microchip: cleanup error handling in ksz_mdio_register Oleksij Rempel
2024-10-28 12:09 ` Andrew Lunn
2024-10-26 6:35 ` [PATCH net-next v1 5/5] net: dsa: microchip: add support for side MDIO interface in LAN937x Oleksij Rempel
2024-10-28 12:15 ` Andrew Lunn
2024-10-28 13:43 ` Oleksij Rempel [this message]
2024-10-29 3:39 ` Arun.Ramadoss
2024-10-29 5:15 ` Oleksij Rempel
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=Zx-U69erLsPBmtLw@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=arun.ramadoss@microchip.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=robh+dt@kernel.org \
--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
all inboxes | Powered by JetHome®