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] [day] [month] [year] [list]
Message-Id: <51580076-5994-48C6-8576-C5CDD5878422@net-swift.com>
Date: Wed, 21 Jun 2023 11:27:07 +0800
From: "mengyuanlou@...-swift.com" <mengyuanlou@...-swift.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net-next] net: ngbe: add Wake on Lan support



> 2023年6月21日 03:21,Andrew Lunn <andrew@...n.ch> 写道:
> 
>> +static void ngbe_get_wol(struct net_device *netdev,
>> + struct ethtool_wolinfo *wol)
>> +{
>> + struct wx *wx = netdev_priv(netdev);
>> +
>> + if (!wx->wol_enabled)
>> + return;
>> + wol->supported = WAKE_MAGIC;
> 
> What exactly does wol_enabled mean?
> 
> You should always return what is supported. Which makes me think
> wol_enabled is more like,
> wol_is_supported_by_this_version_of_firmware?

It means some specific boards which could support wol, get this from subsystem id.
Generic boards do not support WOL, which is decided by hardware and firmware.
> 
> If it is this, please give it a better name than wol_enabled.
> 
>> +static int ngbe_resume(struct pci_dev *pdev)
>> +{
>> + struct net_device *netdev;
>> + struct wx *wx;
>> + u32 err;
>> +
>> + wx = pci_get_drvdata(pdev);
>> + netdev = wx->netdev;
>> +
>> + err = pci_enable_device_mem(pdev);
>> + if (err) {
>> + wx_err(wx, "Cannot enable PCI device from suspend\n");
>> + return err;
>> + }
>> + /* make sure to complete pre-operations */
>> + smp_mb__before_atomic();
> 
> I've no idea what this actually does, but it seems to be used a lot in
> pairs with smp_mb__after_atomic(). Is it actually valid to use it on
> its own, not in a pair?
I'll check it.
> 
>    Andrew
> 
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ