[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a060e5cf-c1cf-4dfa-b534-ddb72e8652f8@lunn.ch>
Date: Wed, 17 Sep 2025 18:58:55 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Jijie Shao <shaojijie@...wei.com>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
shenjian15@...wei.com, liuyonglong@...wei.com,
chenhao418@...wei.com, lantao5@...wei.com,
huangdonghua3@...artners.com, yangshuaisong@...artners.com,
huangdengdui@...artners.com, jonathan.cameron@...wei.com,
salil.mehta@...wei.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net 1/3] net: hns3: fix loopback test of serdes and phy
is failed if duplex is half
On Wed, Sep 17, 2025 at 08:29:52PM +0800, Jijie Shao wrote:
> If duplex setting is half, mac and phy can not transmit and receive data
> at the same time.
Lets think about the fundamentals of Ethernet, MII and half duplex.
Is this specific to your MAC/PHY combination, or just generally true?
Should this is solved in phylib, because it is true for every MAC/PHY
combination? phylib returning -EINAL to phy_loopback() would seem like
the correct thing to do.
Is it specific to your PHY, but independent of the MAC? Then the PHY
should return -EINVAL in its set_loopback() method.
> + hdev->hw.mac.duplex_last = phydev->duplex;
> +
> + ret = phy_set_bits(phydev, MII_BMCR, BMCR_FULLDPLX);
A MAC driver should not be doing this. What if the PHY is C45 only?
And Marvell PHYs need a soft reset before such an operation take
effect.
Andrew
---
pw-bot: cr
Powered by blists - more mailing lists