[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250226084511.5f8f4c62@fedora.home>
Date: Wed, 26 Feb 2025 08:45:11 +0100
From: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: Chris Packham <chris.packham@...iedtelesis.co.nz>
Cc: robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org,
tsbogend@...ha.franken.de, andrew@...n.ch, hkallweit1@...il.com,
linux@...linux.org.uk, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, sander@...nheule.net,
markus.stockhausen@....de, devicetree@...r.kernel.org,
linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next v7 1/2] net: mdio: Add RTL9300 MDIO driver
Hi Chris,
On Wed, 26 Feb 2025 13:07:47 +1300
Chris Packham <chris.packham@...iedtelesis.co.nz> wrote:
> Add a driver for the MDIO controller on the RTL9300 family of Ethernet
> switches with integrated SoC. There are 4 physical SMI interfaces on the
> RTL9300 however access is done using the switch ports. The driver takes
> the MDIO bus hierarchy from the DTS and uses this to configure the
> switch ports so they are associated with the correct PHY. This mapping
> is also used when dealing with software requests from phylib.
>
> Signed-off-by: Chris Packham <chris.packham@...iedtelesis.co.nz>
It all mostly looks good to me, there's one typo though and as it may
be user visible, I think it's worth fixing...
[...]
> +static int rtl9300_mdiobus_probe_one(struct device *dev, struct rtl9300_mdio_priv *priv,
> + struct fwnode_handle *node)
> +{
> + struct rtl9300_mdio_chan *chan;
> + struct fwnode_handle *child;
> + struct mii_bus *bus;
> + u32 mdio_bus;
> + int err;
> +
> + err = fwnode_property_read_u32(node, "reg", &mdio_bus);
> + if (err)
> + return err;
> +
> + fwnode_for_each_child_node(node, child)
> + if (fwnode_device_is_compatible(child, "ethernet-phy-ieee802.3-c45"))
> + priv->smi_bus_is_c45[mdio_bus] = true;
> +
> + bus = devm_mdiobus_alloc_size(dev, sizeof(*chan));
> + if (!bus)
> + return -ENOMEM;
> +
> + bus->name = "Reaktek Switch MDIO Bus";
You probably mean Realtek ? :)
Thanks,
Maxime
Powered by blists - more mailing lists