[Intel-wired-lan] [next PATCH S37 08/15] i40e: Save PCI state before suspend

Wyborny, Carolyn carolyn.wyborny at intel.com
Mon May 16 22:43:28 UTC 2016


ACK

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Bimmy Pujari
> Sent: Monday, May 16, 2016 10:27 AM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S37 08/15] i40e: Save PCI state before
> suspend
> 
> From: Greg Rose <gregory.v.rose at intel.com>
> 
> The i40e_suspend() function was failing to save PCI state
> and this would result in a kernel stack trace from a WARN_ONCE in the
> pci_legacy_suspend() function.
> 
> Add a call to pci_save_state() to fix that problem.
> 
> Signed-off-by: Greg Rose <gregory.v.rose at intel.com>
> Change-ID: I4736e62bb660966bd208cc8af617a14cb07fc4bd
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c
> b/drivers/net/ethernet/intel/i40e/i40e_main.c
> index d71b6bc..ae4d089 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> @@ -11525,6 +11525,7 @@ static int i40e_suspend(struct pci_dev *pdev,
> pm_message_t state)
>  {
>  	struct i40e_pf *pf = pci_get_drvdata(pdev);
>  	struct i40e_hw *hw = &pf->hw;
> +	int retval = 0;
> 
>  	set_bit(__I40E_SUSPENDED, &pf->state);
>  	set_bit(__I40E_DOWN, &pf->state);
> @@ -11538,10 +11539,14 @@ static int i40e_suspend(struct pci_dev *pdev,
> pm_message_t state)
> 
>  	i40e_stop_misc_vector(pf);
> 
> +	retval = pci_save_state(pdev);
> +	if (retval)
> +		return retval;
> +
>  	pci_wake_from_d3(pdev, pf->wol_en);
>  	pci_set_power_state(pdev, PCI_D3hot);
> 
> -	return 0;
> +	return retval;
>  }
> 
>  /**
> --
> 2.4.11
> 
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan at lists.osuosl.org
> http://lists.osuosl.org/mailman/listinfo/intel-wired-lan


More information about the Intel-wired-lan mailing list