[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1171400054.18944.40.camel@rh4>
Date: Tue, 13 Feb 2007 12:54:14 -0800
From: "Michael Chan" <mchan@...adcom.com>
To: "Stephen Hemminger" <shemminger@...ux-foundation.org>
cc: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [TG3 1/8]: Save MSI state before suspend.
On Tue, 2007-02-13 at 11:58 -0800, Stephen Hemminger wrote:
>
> I think you have to move the original pci_save_state call, otherwise
> you will call pci_save_state twice and leak memory. pci_save_state
> allocates memory to store MSI and other information. Look at pci_save_pcie_state
> etc.
>
I think it is ok the way it is. We call pci_restore_state() at least
once during tg3_chip_reset(). This will free any memory allocated
during tg3_init_one()'s call to pci_save_state(), before we even get to
tg3_suspend().
The memory allocated in tg3_suspend()'s call to pci_save_state() will be
freed when tg3_resume() calls pci_restore_state().
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists