netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: jgarzik@pobox.com
Cc: linux@rainbow-software.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: de2104x: fix power management
Date: Sun, 26 Sep 2010 15:49:14 -0700 (PDT)	[thread overview]
Message-ID: <20100926.154914.48490607.davem@davemloft.net> (raw)
In-Reply-To: <4C9E2E88.3080101@pobox.com>

From: Jeff Garzik <jgarzik@pobox.com>
Date: Sat, 25 Sep 2010 13:16:56 -0400

> On 09/25/2010 05:57 AM, Ondrej Zary wrote:
>> At least my 21041 cards come out of suspend with bus mastering
>> disabled so
>> they did not work after resume(no data transferred).
>> After adding pci_set_master(), the driver oopsed immediately on resume
>> -
>> because de_clean_rings() is called on suspend but de_init_rings() call
>> was missing in resume.
>>
>> Also disable link (reset SIA) before sleep (de4x5 does this too).
>>
>> Signed-off-by: Ondrej Zary<linux@rainbow-software.org>
 ...
> Acked-by: Jeff Garzik <jgarzik@redhat.com>

I'll apply this, thanks guys.

> IMO suspend/resume could use another look; if netif_running is false
> (interface is down), de2104x does not put the PCI device to sleep,
> which seems strange.

TG3 does the same.

The reason is that until we bringing the device up (and thus
netif_running becomes true) the device is left in the most appropriate
powered down state.

At least that is my understanding.

What is appropriate for any driver in this situation depends upon how
it programs the device before ->open() occurs.

> I also wonder if rtnl_lock() couldn't be eliminated, as other net
> drivers don't need it in suspend/resume.

I suspect the RTNL stuff here can be safely removed.

I think it's using it to guard the netif_running() check but that
isn't necessary.

      reply	other threads:[~2010-09-26 22:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-25  9:57 de2104x: fix power management Ondrej Zary
2010-09-25 17:16 ` Jeff Garzik
2010-09-26 22:49   ` David Miller [this message]

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=20100926.154914.48490607.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rainbow-software.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 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).