🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #19611

Re: [PATCH net-next] net: hix5hd2_gmac: support fixed-link

#19611
From: Andrew Lunn
Date: Fri, 20 Nov 2026 03:58
29 lines
9237 bytes
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
Technical Details
Message-ID: <2be9a845-d6fa-4b6d-9359-e135d54b33f6@lunn.ch>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367628-linux-kernel-netdev=dewy.ru
References: <20261120031026.1371052-1-mmyangfl@gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367628-linux-kernel-netdev=dewy.ru
From: andrew@lunn.ch (Andrew Lunn)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next] net: hix5hd2_gmac: support fixed-link
Date: Fri, 20 Nov 2026 04:58:31 +0100
Organization: Usenet Network
Message-ID: <2be9a845-d6fa-4b6d-9359-e135d54b33f6@lunn.ch>
References: <20261120031026.1371052-1-mmyangfl@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="3055330"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:aRts1lXz8I+xZHNOpGVWbTRnjIU= sha256:2eoyeEUGg1XhsCd3eLrsFc0g7WJCxNP1byT3ZeL3l6U=
	sha1:kA/PTIbgb2Yg2kt0RTdhhptRono= sha256:qYtgnMTil4Oe86+UIE78fUJjpUWI8AEQnlRNEaDspxk=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 661741158A3; Fri, 20 Nov 2026 06:58:58 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=lunn.ch
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id hgjk2-Wq32Vr;
	Fri, 20 Nov 2026 06:58:51 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-367628-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lunn.ch
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 3B10F11589D; Fri, 20 Nov 2026 06:58:40 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id C8C7D394E1; Fri, 20 Nov 2026 03:58:38 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1795147118;
	b=i/u5/cZGy4P+BkTaqpt5cunM+iwm7slZvmq0p1nGRBejy0fV7ez9eGaApcAiie541dgB
	 uwpW6JqDs8romIz30Gy16roR5Rk9IK9YJgaeElbba0PWUTXX6YSwLPlFgHxlcHbJo+nDs
	 NTyOq6syBrwcy9JmKNmjZuc13AkekHDgSXCh5cI8AmNS0htR2Pdoaioz1refyBBZoHfp6
	 rHfMr3y6p+HTS/L9IzJx2eY3lkHX6r/gtjy0fOmNPadza29ta0pTMCb75iqM0V7Uity7r
	 ggZdT2skKl1fbVALg2zHW/BnRl6HCXLAcHgPXB2nCcD7tZEVm4QBEohfFbofKzC2VqA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795147118;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date:
	 From:To:Cc:Subject:Message-ID:References:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=aRSne2ZR6D1PEdzPCo5kpv8D00B9QyAdQT5/QElv9HE=;
	b=3BlOt1rYibCYFoqL+bKVVXXiXTWM2NQr11B1pPGQomd4lhRG/JAERzYgXSc3jhf+T94R
	 I8lCheCo1qLVG9A047TRGMNBt3nN4xIxXJ3ySvJbSZMdR+DmRLV+EVA/0Fj9RxWwGCNCv
	 Xze+8tos/He3a0dMcz9OFymftjLw0r+Ngkh8ijdyVoHtgPjaMWs3G05cJ36D1OntizalA
	 jrYFXIzpVovoueWezJ1WUZ6lQyB9UigBbO/r/2TD0u/2IgaFBdB9Ifd2jtiIM7qLj9N98
	 7O51c62h7eFMx6kG9L5nfWYLwEjBcpcWq2ctM9vKFiyMN4w3GoSqm7Kh8WhyeRA64Yg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=p3KNVpsi;
	dmarc=pass header.from=lunn.ch;
	spf=pass smtp.mailfrom=lunn.ch;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 27166606A331;
	Fri, 20 Nov 2026 03:58:38 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=p3KNVpsi
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795147117;
	b=CaImzR4RDnthvt50AJQHSqHbDBPRWKv2vgRZSaxsmrT898PxXqlZGWUTIGhsCOU6iLAC
	 TxuOLHpVkgTE7i8obVPEFIDragX9Oa0hNxHtTdsle3Af/5Vk2vloYN4NmnduVzxXBhs9m
	 42vgh1habyZ20oEFhte+Go3MRLD8Kx+7GgrpsW2XcPJHAmB4wj+yFv31f1gyenE3P/ub3
	 ChpUMTMSwe/0I5odc5SbYq3naTtkv9rzsi89tgv7wPlvaqxY7uCDkhh4eaByaR33mrqRX
	 GngwsUhoozPATiVN4cApXrC5/Vx5nXsxKJR67g5EFtNYU7bGs2ArUrqilRh5mtpJXRQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795147117;
	h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject:
	 Message-ID:References:MIME-Version:Content-Type:Content-Disposition:
	 In-Reply-To;
	bh=aRSne2ZR6D1PEdzPCo5kpv8D00B9QyAdQT5/QElv9HE=;
	b=Wu7d4tAkAWt4AcIrF1Qv6sAx79mevpfXu5QQvGO9o99Lkpw3ngrNeLd8HAlHSR3jMJ74
	 /UK9TrqgFmucPiXWzfGO5gW9+hKwbfekDbz64eJgMDWD4f2V1XcRIa3mGBILKn+sIraUR
	 d52XvQwV60aFRYezTPRUaDWcNCT5i4q09kHCTOQSmq582jgGdJ2p7qGSQjn6Vnor/wH6M
	 vd1gEjUKgqmt72RR4RkeTQmfLzS7pQ/R7awfztFbneu9i4PYP4aFxYRHuFHzqQFVsX++Z
	 jBWG5X/+BLBTCiv2AdZFMB0M3TZ1cT1zCmWLYg5S6EkxaAkbvYCPalSyud1+aFC+zOA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=lunn.ch;
	spf=pass smtp.mailfrom=lunn.ch;
	dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=p3KNVpsi;
	arc=none smtp.remote-ip=156.67.10.101
X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id F3BEF606A320
	for <netdev@vger.kernel.org>; Fri, 20 Nov 2026 03:58:36 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org F3BEF606A320
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch
X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch;
	s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version:
	References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject:
	Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:
	Content-ID:Content-Description:Content-Disposition:In-Reply-To:References;
	bh=aRSne2ZR6D1PEdzPCo5kpv8D00B9QyAdQT5/QElv9HE=; b=p3KNVpsiufT6jaI5IHyCv8ZMuV
	wYegiIJW5xpkGc57pI18bHQYUJIh3BGNt12shnAy0vb7NaNAL9QHKSvZIsF3PEZWGdfoPuxv+UGeH
	V5mqi0OR2J06UV/izjmkWG02TtCkLalBQn4+48QHrt4LhZw3G8FhWCvI4wim0RzvW8j4=;
X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2)
	(envelope-from <andrew@lunn.ch>)
	id 1xUFlf-000CCv-8J; Fri, 20 Nov 2026 04:58:31 +0100
X-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>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <20261120031026.1371052-1-mmyangfl@gmail.com>