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: <LV8PR11MB87009A3E7C1817051806A6FE9F5F2@LV8PR11MB8700.namprd11.prod.outlook.com>
Date: Thu, 29 Feb 2024 04:52:12 +0000
From: <Raju.Lakkaraju@...rochip.com>
To: <Horatiu.Vultur@...rochip.com>
CC: <netdev@...r.kernel.org>, <davem@...emloft.net>, <kuba@...nel.org>,
	<linux-kernel@...r.kernel.org>, <Bryan.Whitehead@...rochip.com>,
	<richardcochran@...il.com>, <UNGLinuxDriver@...rochip.com>
Subject: RE: [PATCH net 2/3] net: lan743x: support WOL in MAC even when PHY
 does not

Hi Horatiu,

> -----Original Message-----
> From: Horatiu Vultur - M31836 <Horatiu.Vultur@...rochip.com>
> Sent: Monday, February 26, 2024 1:59 PM
> To: Raju Lakkaraju - I30499 <Raju.Lakkaraju@...rochip.com>
> Cc: netdev@...r.kernel.org; davem@...emloft.net; kuba@...nel.org; linux-
> kernel@...r.kernel.org; Bryan Whitehead - C21958
> <Bryan.Whitehead@...rochip.com>; richardcochran@...il.com;
> UNGLinuxDriver <UNGLinuxDriver@...rochip.com>
> Subject: Re: [PATCH net 2/3] net: lan743x: support WOL in MAC even when
> PHY does not
> 
> The 02/26/2024 13:39, Raju Lakkaraju wrote:
> > Allow WOL support if MAC supports it, even if the PHY does not support
> > it
> >
> > Fixes: e9e13b6adc338 ("lan743x: fix for potential NULL pointer
> > dereference with bare card")
> >
> Please no spaces between the tags. And you should not split on multiple line
> Fixes tag.
> 

I will fix this issue.

> > Signed-off-by: Raju Lakkaraju <Raju.Lakkaraju@...rochip.com>
> > ---
> >  drivers/net/ethernet/microchip/lan743x_ethtool.c | 14 ++++++++++++--
> >  1 file changed, 12 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/microchip/lan743x_ethtool.c
> > b/drivers/net/ethernet/microchip/lan743x_ethtool.c
> > index a2b3f4433ca8..4899582b3d1d 100644
> > --- a/drivers/net/ethernet/microchip/lan743x_ethtool.c
> > +++ b/drivers/net/ethernet/microchip/lan743x_ethtool.c
> > @@ -1163,6 +1163,17 @@ static int lan743x_ethtool_set_wol(struct
> net_device *netdev,
> >  				   struct ethtool_wolinfo *wol)
> >  {
> >  	struct lan743x_adapter *adapter = netdev_priv(netdev);
> > +	int ret;
> > +
> > +	if (netdev->phydev) {
> > +		ret = phy_ethtool_set_wol(netdev->phydev, wol);
> > +		if (ret != -EOPNOTSUPP && ret != 0)
> > +			return ret;
> > +
> > +		if (ret == -EOPNOTSUPP)
> > +			netif_info(adapter, drv, adapter->netdev,
> > +				   "phy does not support WOL\n");
> > +	}
> >
> >  	adapter->wolopts = 0;
> >  	if (wol->wolopts & WAKE_UCAST)
> > @@ -1187,8 +1198,7 @@ static int lan743x_ethtool_set_wol(struct
> > net_device *netdev,
> >
> >  	device_set_wakeup_enable(&adapter->pdev->dev, (bool)wol-
> >wolopts);
> >
> > -	return netdev->phydev ? phy_ethtool_set_wol(netdev->phydev, wol)
> > -			: -ENETDOWN;
> > +	return 0;
> >  }
> >  #endif /* CONFIG_PM */
> >
> > --
> > 2.34.1
> >
> 
> --
> /Horatiu

Thanks,
Raju

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ