netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ixgbevf: use pci drvdata correctly in ixgbevf_suspend()
@ 2013-11-07  8:13 Wei Yongjun
  2013-11-07  8:21 ` Jeff Kirsher
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-11-07  8:13 UTC (permalink / raw)
  To: jeffrey.t.kirsher, jesse.brandeburg, bruce.w.allan,
	carolyn.wyborny, donald.c.skidmore, gregory.v.rose,
	peter.p.waskiewicz.jr, alexander.h.duyck, john.ronciak,
	tushar.n.dave, davem, kaber, gregkh
  Cc: yongjun_wei, e1000-devel, netdev

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

We had set the pci driver-specific data in ixgbevf_probe() as a type of
struct net_device, so we should use it as netdev in ixgbevf_suspend().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 59a62bb..a119ae4 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -3197,8 +3197,8 @@ static int ixgbevf_suspend(struct pci_dev *pdev, pm_message_t state)
 #ifdef CONFIG_PM
 static int ixgbevf_resume(struct pci_dev *pdev)
 {
-	struct ixgbevf_adapter *adapter = pci_get_drvdata(pdev);
-	struct net_device *netdev = adapter->netdev;
+	struct net_device *netdev = pci_get_drvdata(pdev);
+	struct ixgbevf_adapter *adapter = netdev_priv(netdev);
 	u32 err;
 
 	pci_set_power_state(pdev, PCI_D0);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ixgbevf: use pci drvdata correctly in ixgbevf_suspend()
  2013-11-07  8:13 [PATCH] ixgbevf: use pci drvdata correctly in ixgbevf_suspend() Wei Yongjun
@ 2013-11-07  8:21 ` Jeff Kirsher
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Kirsher @ 2013-11-07  8:21 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: jesse.brandeburg, bruce.w.allan, carolyn.wyborny,
	donald.c.skidmore, gregory.v.rose, peter.p.waskiewicz.jr,
	alexander.h.duyck, john.ronciak, tushar.n.dave, davem, kaber,
	gregkh, yongjun_wei, e1000-devel, netdev

[-- Attachment #1: Type: text/plain, Size: 502 bytes --]

On Thu, 2013-11-07 at 16:13 +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> We had set the pci driver-specific data in ixgbevf_probe() as a type
> of
> struct net_device, so we should use it as netdev in ixgbevf_suspend().
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
>  drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Thanks Wei, I will add this patch to my queue.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-07  8:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-07  8:13 [PATCH] ixgbevf: use pci drvdata correctly in ixgbevf_suspend() Wei Yongjun
2013-11-07  8:21 ` Jeff Kirsher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).