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: <db012bd7-0d97-4040-bbca-e8f8b1093aad@lunn.ch>
Date: Thu, 1 Aug 2024 14:07:35 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Jijie Shao <shaojijie@...wei.com>
Cc: yisen.zhuang@...wei.com, salil.mehta@...wei.com, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
	horms@...nel.org, shenjian15@...wei.com, wangpeiyang1@...wei.com,
	liuyonglong@...wei.com, sudongming1@...wei.com,
	xujunsheng@...wei.com, shiyongbang@...wei.com,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH net-next 03/10] net: hibmcge: Add mdio and hardware
 configuration supported in this module

> > > +/* include phy link and mac link */
> > > +u32 hbg_get_link_status(struct hbg_priv *priv)
> > > +{
> > > +	struct phy_device *phydev = priv->mac.phydev;
> > > +	int ret;
> > > +
> > > +	if (!phydev)
> > > +		return HBG_LINK_DOWN;
> > > +
> > > +	phy_read_status(phydev);
> > > +	if ((phydev->state != PHY_UP && phydev->state != PHY_RUNNING) ||
> > > +	    !phydev->link)
> > > +		return HBG_LINK_DOWN;
> > > +
> > > +	ret = hbg_hw_sgmii_autoneg(priv);
> > > +	if (ret)
> > > +		return HBG_LINK_DOWN;
> > > +
> > > +	return HBG_LINK_UP;
> > > +}
> > There should not be any need for this. So why do you have it?
> 
> I'll move this to another patch where it's more appropriate.

That does not explain why it is needed. Generally, phylib tells you if
the link is up, as part of the adjust_link callback. Why do you need
to do something which no other driver does?

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ