Netdev List
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: David Yang <mmyangfl@gmail.com>
Cc: netdev@vger.kernel.org, Jian Shen <shenjian15@huawei.com>,
	Jijie Shao <shaojijie@huawei.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next] net: hix5hd2_gmac: support fixed-link
Date: Fri, 20 Nov 2026 04:58:31 +0100	[thread overview]
Message-ID: <2be9a845-d6fa-4b6d-9359-e135d54b33f6@lunn.ch> (raw)
In-Reply-To: <20261120031026.1371052-1-mmyangfl@gmail.com>

On Fri, Nov 20, 2026 at 11:10:23AM +0800, David Yang wrote:
> On Hi3716cv200 hix5hd2_gmac is found directly linked to another MAC
> without PHY. The driver didn't take fixed-link into account and failed
> probe when the node has no phy-handle.
> 
> Add support for fixed-link. A fixed link has no PHY address, yet
> of_mdiobus_register() walks all 32 addresses and prints a warning line
> for every address.

What warning does it give?

> @@ -1189,7 +1189,12 @@ static int hix5hd2_dev_probe(struct platform_device *pdev)
>  	snprintf(bus->id, MII_BUS_ID_SIZE, "%s-mii", dev_name(&pdev->dev));
>  	priv->bus = bus;
>  
> -	ret = of_mdiobus_register(bus, node);
> +	if (of_phy_is_fixed_link(node)) {
> +		bus->phy_mask = ~0;
> +		ret = mdiobus_register(bus);
> +	} else {
> +		ret = of_mdiobus_register(bus, node);
> +	}

This seems wrong. The MDIO bus has nothing to do with a fixed
link. There is nothing to stop you having devices on the bus, e.g. an
Ethernet switch, while the MAC uses a fixed link.

	Andrew

  reply	other threads:[~2026-11-20  3:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20  3:10 [PATCH net-next] net: hix5hd2_gmac: support fixed-link David Yang
2026-11-20  3:58 ` Andrew Lunn [this message]
2026-11-24  3:12 ` netdev-bot+sashiko

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=2be9a845-d6fa-4b6d-9359-e135d54b33f6@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=kuba@kernel.org \
    --cc=mmyangfl@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shaojijie@huawei.com \
    --cc=shenjian15@huawei.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