[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191016170231.4ac6a021@cakuba.netronome.com>
Date: Wed, 16 Oct 2019 17:02:31 -0700
From: Jakub Kicinski <jakub.kicinski@...ronome.com>
To: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Cc: davem@...emloft.net, Sasha Neftin <sasha.neftin@...el.com>,
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 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?
>
> 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
> 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