]> git.ipfire.org Git - thirdparty/linux.git/commit
net: hibmcge: support scenario without PHY
authorJijie Shao <shaojijie@huawei.com>
Wed, 2 Jul 2025 12:57:14 +0000 (20:57 +0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 8 Jul 2025 15:54:25 +0000 (08:54 -0700)
commit1d7cd7a9c69c2f59ee80a15bd6f3650aa518125a
treede5bdcd569fff8715ec66c4e618c9b2db8fbaa4d
parenteffdbb29fdd205db9a816077844bca9f79a1feec
net: hibmcge: support scenario without PHY

Currently, the driver uses phylib to operate PHY by default.

On some boards, the PHY device is separated from the MAC device.
As a result, the hibmcge driver cannot operate the PHY device.

In this patch, the driver determines whether a PHY is available
based on register configuration. If no PHY is available,
the driver will use fixed_phy to register fake phydev.

Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com>
Link: https://patch.msgid.link/20250702125716.2875169-2-shaojijie@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/hisilicon/hibmcge/hbg_mdio.c