Re: [PATCH] igb: fix kexec with igb

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Yinghai Lu
Date: Sunday, March 8, 2009 - 11:10 am

Rafael J. Wysocki wrote:

not sure... please check the version for forcedeth that you made.

commit 3cb5599a84c557c0dd9a19feb63a3788268cf249
Author: Rafael J. Wysocki <rjw@sisk.pl>
Date:   Fri Sep 5 14:00:19 2008 -0700

    forcedeth: fix kexec regression
    
    Fix regression tracked as http://bugzilla.kernel.org/show_bug.cgi?id=11361
    and caused by commit f735a2a1a4f2a0f5cd823ce323e82675990469e2 ("[netdrvr]
    forcedeth: setup wake-on-lan before shutting down") that makes network
    adapters integrated into the NVidia MCP55 chipsets fail to work in kexeced
    kernels.  The problem appears to be that if the adapter is put into D3_hot
    during ->shutdown(), it cannot be brought back into D0 after kexec (ref.
    http://marc.info/?l=linux-kernel&m=121900062814967&w=4).  Therefore, only
    put forcedeth into D3 during ->shutdown() if the system is to be powered
    off.
    
    Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
    Tested-by: Yinghai Lu <yhlu.kernel@gmail.com>
    Cc: Ayaz Abdulla <aabdulla@nvidia.com>
    Acked-by: Jeff Garzik <jeff@garzik.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 331b86b..0b6ecef 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -5975,10 +5975,12 @@ static void nv_shutdown(struct pci_dev *pdev)
        if (netif_running(dev))
                nv_close(dev);
 
-       pci_enable_wake(pdev, PCI_D3hot, np->wolenabled);
-       pci_enable_wake(pdev, PCI_D3cold, np->wolenabled);
        pci_disable_device(pdev);
-       pci_set_power_state(pdev, PCI_D3hot);
+       if (system_state == SYSTEM_POWER_OFF) {
+               if (pci_enable_wake(pdev, PCI_D3cold, np->wolenabled))
+                       pci_enable_wake(pdev, PCI_D3hot, np->wolenabled);
+               pci_set_power_state(pdev, PCI_D3hot);
+       }
 }
 #else
 #define nv_suspend NULL

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] igb: fix kexec with igb, Yinghai Lu, (Fri Mar 6, 9:33 pm)
Re: [PATCH] igb: fix kexec with igb, Jesse Brandeburg, (Sat Mar 7, 12:18 am)
Re: [PATCH] igb: fix kexec with igb, Yinghai Lu, (Sat Mar 7, 12:31 am)
Re: [PATCH] igb: fix kexec with igb, Eric W. Biederman, (Sat Mar 7, 11:20 am)
Re: [PATCH] igb: fix kexec with igb, Yinghai Lu, (Sat Mar 7, 11:50 am)
[PATCH] pci: fix kexec with power state D3, Yinghai Lu, (Sun Mar 8, 1:09 am)
Re: [PATCH] pci: fix kexec with power state D3, Rafael J. Wysocki, (Sun Mar 8, 3:08 am)
Re: [PATCH] pci: fix kexec with power state D3, Ingo Molnar, (Sun Mar 8, 3:15 am)
Re: [PATCH] pci: fix kexec with power state D3, Rafael J. Wysocki, (Sun Mar 8, 3:28 am)
Re: [PATCH] pci: fix kexec with power state D3, Rafael J. Wysocki, (Sun Mar 8, 3:33 am)
Re: [PATCH] igb: fix kexec with igb, Rafael J. Wysocki, (Sun Mar 8, 3:45 am)
Re: [PATCH] igb: fix kexec with igb, Rafael J. Wysocki, (Sun Mar 8, 3:57 am)
Re: [PATCH] pci: fix kexec with power state D3, Ingo Molnar, (Sun Mar 8, 4:08 am)
Re: [PATCH] igb: fix kexec with igb, Yinghai Lu, (Sun Mar 8, 11:03 am)
Re: [PATCH] igb: fix kexec with igb, Yinghai Lu, (Sun Mar 8, 11:10 am)
Re: [PATCH] igb: fix kexec with igb, Rafael J. Wysocki, (Sun Mar 8, 2:08 pm)
Re: [PATCH] igb: fix kexec with igb, Yinghai Lu, (Sun Mar 8, 2:18 pm)
Re: [PATCH] igb: fix kexec with igb, Rafael J. Wysocki, (Sun Mar 8, 2:32 pm)
Re: [PATCH] igb: fix kexec with igb, Rafael J. Wysocki, (Sun Mar 8, 2:40 pm)
Re: [PATCH] igb: fix kexec with igb, Yinghai Lu, (Sun Mar 8, 3:35 pm)
Re: [PATCH] igb: fix kexec with igb, Rafael J. Wysocki, (Sun Mar 8, 3:57 pm)
Re: [PATCH] igb: fix kexec with igb, Yinghai Lu, (Sun Mar 8, 4:04 pm)
Re: [PATCH] igb: fix kexec with igb, Rafael J. Wysocki, (Sun Mar 8, 4:57 pm)
Re: [PATCH] igb: fix kexec with igb, Yinghai Lu, (Wed Mar 11, 4:37 pm)
Re: [PATCH] pci: fix kexec with power state D3, Jesse Barnes, (Thu Mar 19, 6:49 pm)
Re: [PATCH] pci: fix kexec with power state D3, Rafael J. Wysocki, (Fri Mar 20, 4:29 am)
[Updated patch] Re: [PATCH] igb: fix kexec with igb, Rafael J. Wysocki, (Sat Mar 21, 3:04 pm)
Re: [Updated patch] Re: [PATCH] igb: fix kexec with igb, Rafael J. Wysocki, (Sat Mar 28, 2:27 pm)
Re: [Updated patch] Re: [PATCH] igb: fix kexec with igb, Jeff Kirsher, (Sat Mar 28, 7:30 pm)
Re: [Updated patch] Re: [PATCH] igb: fix kexec with igb, Rafael J. Wysocki, (Sun Mar 29, 4:19 am)
Re: [Updated patch] Re: [PATCH] igb: fix kexec with igb, Jeff Kirsher, (Mon Mar 30, 2:36 pm)
Re: [Updated patch] Re: [PATCH] igb: fix kexec with igb, Rafael J. Wysocki, (Mon Mar 30, 2:39 pm)
RE: [Updated patch] Re: [PATCH] igb: fix kexec with igb, Tantilov, Emil S, (Tue Mar 31, 12:14 pm)
Re: [Updated patch] Re: [PATCH] igb: fix kexec with igb, Jeff Kirsher, (Tue Mar 31, 12:51 pm)
Re: [Updated patch] Re: [PATCH] igb: fix kexec with igb, Rafael J. Wysocki, (Tue Mar 31, 1:27 pm)