[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1186097880.18322.73.camel@dell>
Date: Thu, 02 Aug 2007 16:38:00 -0700
From: "Michael Chan" <mchan@...adcom.com>
To: "David Miller" <davem@...emloft.net>
cc: joachim.deguara@....com, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org, michal.k.k.piotrowski@...il.com,
"netdev" <netdev@...r.kernel.org>, linux-acpi@...r.kernel.org
Subject: Re: [REGRESSION] tg3 dead after s2ram
On Thu, 2007-08-02 at 15:06 -0700, David Miller wrote:
> From: "Michael Chan" <mchan@...adcom.com>
> Date: Thu, 02 Aug 2007 12:10:29 -0700
>
> > 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? :-)
>
Yes for sure when netif state is running and we were already doing that.
> 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().
I suggested calling pci_enable_device() in ->open(), not calling
pci_restore_state() in ->open(). I ultimately decided against it
because some devices do not enable memory as a workaround and it would
be messy to deal with it again in tg3_open().
I definitely agree that calling PCI restore in ->open() is a bad idea.
We used to save PCI state in ->probe() once and restore PCI state after
every chip reset. This sequence caused many subtle problems.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists