All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kok, Auke" <auke-jan.h.kok@intel.com>
To: akpm@linux-foundation.org
Cc: jeff@garzik.org, netdev@vger.kernel.org, arvidjaar@mail.ru
Subject: Re: [patch (for 2.6.25?) 1/3] e100: do suspend/shutdown like e1000
Date: Tue, 04 Mar 2008 15:03:38 -0800	[thread overview]
Message-ID: <47CDD54A.60101@intel.com> (raw)
In-Reply-To: <200803042258.m24MwfoZ001397@imap1.linux-foundation.org>

akpm@linux-foundation.org wrote:
> From: "Kok, Auke" <auke-jan.h.kok@intel.com>
> 
> This fixes a "trying to free already free IRQ" message and simplifies the
> shutdown/suspend code by re-using already existing code when going to
> suspend.  The code is now symmetric with e100_resume.
> 
> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
> Tested-by: Andrey Borzenkov <arvidjaar@mail.ru>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>


This should already be in jeff's inbox ...

Auke


> ---
> 
>  drivers/net/e100.c |   29 +++--------------------------
>  1 file changed, 3 insertions(+), 26 deletions(-)
> 
> diff -puN drivers/net/e100.c~e100-do-suspend-shutdown-like-e1000 drivers/net/e100.c
> --- a/drivers/net/e100.c~e100-do-suspend-shutdown-like-e1000
> +++ a/drivers/net/e100.c
> @@ -2782,16 +2782,13 @@ static void __devexit e100_remove(struct
>  	}
>  }
>  
> -#ifdef CONFIG_PM
>  static int e100_suspend(struct pci_dev *pdev, pm_message_t state)
>  {
>  	struct net_device *netdev = pci_get_drvdata(pdev);
>  	struct nic *nic = netdev_priv(netdev);
>  
>  	if (netif_running(netdev))
> -		napi_disable(&nic->napi);
> -	del_timer_sync(&nic->watchdog);
> -	netif_carrier_off(nic->netdev);
> +		e100_down(nic);
>  	netif_device_detach(netdev);
>  
>  	pci_save_state(pdev);
> @@ -2804,14 +2801,13 @@ static int e100_suspend(struct pci_dev *
>  		pci_enable_wake(pdev, PCI_D3cold, 0);
>  	}
>  
> -	free_irq(pdev->irq, netdev);
> -
>  	pci_disable_device(pdev);
>  	pci_set_power_state(pdev, PCI_D3hot);
>  
>  	return 0;
>  }
>  
> +#ifdef CONFIG_PM
>  static int e100_resume(struct pci_dev *pdev)
>  {
>  	struct net_device *netdev = pci_get_drvdata(pdev);
> @@ -2832,26 +2828,7 @@ static int e100_resume(struct pci_dev *p
>  
>  static void e100_shutdown(struct pci_dev *pdev)
>  {
> -	struct net_device *netdev = pci_get_drvdata(pdev);
> -	struct nic *nic = netdev_priv(netdev);
> -
> -	if (netif_running(netdev))
> -		napi_disable(&nic->napi);
> -	del_timer_sync(&nic->watchdog);
> -	netif_carrier_off(nic->netdev);
> -
> -	if ((nic->flags & wol_magic) | e100_asf(nic)) {
> -		pci_enable_wake(pdev, PCI_D3hot, 1);
> -		pci_enable_wake(pdev, PCI_D3cold, 1);
> -	} else {
> -		pci_enable_wake(pdev, PCI_D3hot, 0);
> -		pci_enable_wake(pdev, PCI_D3cold, 0);
> -	}
> -
> -	free_irq(pdev->irq, netdev);
> -
> -	pci_disable_device(pdev);
> -	pci_set_power_state(pdev, PCI_D3hot);
> +	e100_suspend(pdev, PMSG_SUSPEND);
>  }
>  
>  /* ------------------ PCI Error Recovery infrastructure  -------------- */
> _


  reply	other threads:[~2008-03-04 23:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-04 22:58 [patch (for 2.6.25?) 1/3] e100: do suspend/shutdown like e1000 akpm
2008-03-04 23:03 ` Kok, Auke [this message]
2008-03-04 23:33   ` Andrew Morton
2008-03-04 23:44     ` Kok, Auke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47CDD54A.60101@intel.com \
    --to=auke-jan.h.kok@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=arvidjaar@mail.ru \
    --cc=jeff@garzik.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.