Thread (13 messages) flat view 13 messages, 4 authors, 2007-08-04

Re: [REGRESSION] tg3 dead after s2ram

From: David Miller <davem@davemloft.net>
Date: 2007-08-02 22:06:48
Also in: linux-acpi, lkml

From: "Michael Chan" <mchan@broadcom.com>
Date: Thu, 02 Aug 2007 12:10:29 -0700
On Thu, 2007-08-02 at 02:23 -0700, David Miller wrote:
quoted
From: "Joachim Deguara" <redacted>
Date: Thu, 2 Aug 2007 11:15:05 +0200
quoted
Seams like even if powersave shuts down the network that the device should 
still work after a suspend to ram, so who is at fault here?
It's a good question.

The pci_enable() is done on the PCI device at probe time, at least in
the tg3 driver, and with such a model restoring and saving of PCI
config space should not be dependant upon whether the netdev is
running or not.
Alternatively, we can also fix it by calling pci_enable_device() again
in tg3_open().  But I think it is better to just always save and restore
in suspend/resume.  bnx2.c will also require the same fix.
We could do it that way.  But don't you think it's more reliable to
save and restore around the event we know will be what clobbers the
PCI config space on us? :-)

Other things might happen between ->resume() and ->open() that could
modify PCI config space, and we could overwrite such changes if we do
the PCI restore in ->open().

One thing that's interesting to me is that, essentially, every PCI
driver with very few if any exceptions needs to do this sequence on
suspend and resume.  It would be nice if there was a way to get this
to happen transparently by default, with some reasonable override
mechanism, for PCI device drivers.

Anyways, once your patch is tested feel free to send me the bnx2
one too.

Thanks!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help