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]
Date:   Thu, 17 Oct 2019 08:09:44 +0300
From:   "Neftin, Sasha" <sasha.neftin@...el.com>
To:     Jakub Kicinski <jakub.kicinski@...ronome.com>,
        Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Cc:     davem@...emloft.net, netdev@...r.kernel.org, nhorman@...hat.com,
        sassmann@...hat.com,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        Vitaly Lifshits <vitaly.lifshits@...el.com>,
        Rajneesh Bhardwaj <rajneesh.bhardwaj@...ux.intel.com>,
        Aaron Brown <aaron.f.brown@...el.com>
Subject: Re: [net-next 4/7] e1000e: Add support for S0ix

On 10/17/2019 03:02, Jakub Kicinski wrote:
> On Wed, 16 Oct 2019 16:47:08 -0700, Jeff Kirsher wrote:
>>   static int e1000e_pm_freeze(struct device *dev)
>>   {
>>   	struct net_device *netdev = dev_get_drvdata(dev);
>> @@ -6650,6 +6822,9 @@ static int e1000e_pm_thaw(struct device *dev)
>>   static int e1000e_pm_suspend(struct device *dev)
>>   {
>>   	struct pci_dev *pdev = to_pci_dev(dev);
>> +	struct net_device *netdev = pci_get_drvdata(to_pci_dev(dev));
>> +	struct e1000_adapter *adapter = netdev_priv(netdev);
>> +	struct e1000_hw *hw = &adapter->hw;
>>   	int rc;
> 
> reverse xmas tree?
> 
What do you suggest, move the 'struct pci_dev *pdev' two lines below?
>>   
>>   	e1000e_flush_lpic(pdev);
>> @@ -6660,14 +6835,25 @@ static int e1000e_pm_suspend(struct device *dev)
>>   	if (rc)
>>   		e1000e_pm_thaw(dev);
>>   
>> +	/* Introduce S0ix implementation */
>> +	if (hw->mac.type >= e1000_pch_cnp)
>> +		e1000e_s0ix_entry_flow(adapter);
> 
> the entry/exit functions never fail, you can make them return void
> 
Thanks Jakub for yor comment.This is only initial flow. We continue 
development S0ix support for next product and I consider add error code 
if it will required.
>>   	return rc;
>>   }
>>   
>>   static int e1000e_pm_resume(struct device *dev)
>>   {
>>   	struct pci_dev *pdev = to_pci_dev(dev);
>> +	struct net_device *netdev = pci_get_drvdata(to_pci_dev(dev));
>> +	struct e1000_adapter *adapter = netdev_priv(netdev);
>> +	struct e1000_hw *hw = &adapter->hw;
>>   	int rc;
>>   
>> +	/* Introduce S0ix implementation */
>> +	if (hw->mac.type >= e1000_pch_cnp)
>> +		e1000e_s0ix_exit_flow(adapter);
>> +
>>   	rc = __e1000_resume(pdev);
>>   	if (rc)
>>   		return rc;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ