mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Felipe W Damasio <felipewd@terra.com.br>
To: Adrian Yee <brewt-linux-kernel@brewt.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 8139too not running s3 suspend/resume pci fix
Date: Mon, 26 Apr 2004 16:09:13 -0300	[thread overview]
Message-ID: <408D5E59.1090009@terra.com.br> (raw)
In-Reply-To: <GMail.1082958599.119234554.04321010111@brewt.org>

	Hi Adrian,

Adrian Yee wrote:
> +	pci_set_power_state (pdev, 3);
> +	pci_save_state (pdev, tp->pci_state);
> +
>  	if (!netif_running (dev))
>  		return 0;
>  
> @@ -2571,9 +2574,6 @@ static int rtl8139_suspend (struct pci_d
>  
>  	spin_unlock_irqrestore (&tp->lock, flags);
>  
> -	pci_set_power_state (pdev, 3);
> -	pci_save_state (pdev, tp->pci_state);
> -
>  	return 0;
>  }

	IMHO, there's no problem in doing "pci_save_state (pdev, 
tp->pci_state)" before the suspend code..but I'm more confortable with 
leaving the set_power_state at the end of that path, since if the 
interface is down, we don't want to leave it in cold state.

> @@ -2583,10 +2583,10 @@ static int rtl8139_resume (struct pci_de
>  	struct net_device *dev = pci_get_drvdata (pdev);
>  	struct rtl8139_private *tp = dev->priv;
>  
> -	if (!netif_running (dev))
> -		return 0;
>  	pci_restore_state (pdev, tp->pci_state);
>  	pci_set_power_state (pdev, 0);
> +	if (!netif_running (dev))
> +		return 0;
>  	rtl8139_init_ring (dev);
>  	rtl8139_hw_start (dev);
>  	netif_device_attach (dev);

	Same thing here.

	Cheers,

Felipe

  reply	other threads:[~2004-04-26 19:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-26  5:49 Adrian Yee
2004-04-26 19:09 ` Felipe W Damasio [this message]
2004-04-26 21:57   ` Adrian Yee

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=408D5E59.1090009@terra.com.br \
    --to=felipewd@terra.com.br \
    --cc=brewt-linux-kernel@brewt.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®