lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1d82f748-2173-4e24-9f4c-e2dd71c02c44@huawei.com>
Date: Fri, 14 Feb 2025 10:39:09 +0800
From: Jijie Shao <shaojijie@...wei.com>
To: Andrew Lunn <andrew@...n.ch>
CC: <shaojijie@...wei.com>, <davem@...emloft.net>, <edumazet@...gle.com>,
	<kuba@...nel.org>, <pabeni@...hat.com>, <andrew+netdev@...n.ch>,
	<horms@...nel.org>, <shenjian15@...wei.com>, <wangpeiyang1@...wei.com>,
	<liuyonglong@...wei.com>, <chenhao418@...wei.com>, <sudongming1@...wei.com>,
	<xujunsheng@...wei.com>, <shiyongbang@...wei.com>, <libaihan@...wei.com>,
	<jonathan.cameron@...wei.com>, <shameerali.kolothum.thodi@...wei.com>,
	<salil.mehta@...wei.com>, <netdev@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next 5/7] net: hibmcge: Add mac link exception
 handling feature in this module


on 2025/2/14 4:05, Andrew Lunn wrote:
>> +int hbg_reset_phy(struct hbg_priv *priv)
>> +{
>> +	struct phy_device *phydev = priv->mac.phydev;
>> +
>> +	if (phydev->drv->soft_reset)
>> +		return phydev->drv->soft_reset(phydev);
>> +
>> +	return genphy_soft_reset(phydev);
>> +}
> A MAC driver should not be doing a soft reset on a PHY. For some
> devices, this clears out all the settings. I would suggest you use
> phy_stop(), phy_start() which are functions a MAC driver is allowed to
> use.
>
> 	Andrew

Well, I think your advice is helpful.

It is also a good practice to restart the PHY, which also triggers link relinking.

Thank you. I'll test this method.

Thanks,
Jijie Shao


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ