[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7738e272-b0ee-4a8c-8501-7030798c4e9c@lunn.ch>
Date: Mon, 28 Oct 2024 13:08:47 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Florian Fainelli <f.fainelli@...il.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Vladimir Oltean <olteanv@...il.com>,
Woojung Huh <woojung.huh@...rochip.com>,
Arun Ramadoss <arun.ramadoss@...rochip.com>,
Conor Dooley <conor+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Rob Herring <robh+dt@...nel.org>, kernel@...gutronix.de,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
UNGLinuxDriver@...rochip.com,
"Russell King (Oracle)" <linux@...linux.org.uk>,
devicetree@...r.kernel.org
Subject: Re: [PATCH net-next v1 3/5] net: dsa: microchip: Refactor MDIO
handling for side MDIO access
> static int ksz_mdio_register(struct ksz_device *dev)
> {
> + struct device_node *parent_bus_node;
> + struct mii_bus *parent_bus = NULL;
> struct dsa_switch *ds = dev->ds;
> struct device_node *mdio_np;
> struct mii_bus *bus;
> - int ret;
> + struct dsa_port *dp;
> + int ret, i;
>
> mdio_np = of_get_child_by_name(dev->dev->of_node, "mdio");
> if (!mdio_np)
> return 0;
>
> + parent_bus_node = of_parse_phandle(mdio_np, "mdio-parent-bus", 0);
> + if (parent_bus_node && !dev->info->phy_side_mdio_supported) {
> + dev_warn(dev->dev, "Side MDIO bus is not supported for this HW, ignoring 'mdio-parent-bus' property.\n");
I think dev_err() and return -EINVAL. It is an error in the DT.
Andrew
---
pw-bot: cr
Powered by blists - more mailing lists