Re: [PATCH] forcedeth: Fix kexec regression

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Tuesday, August 19, 2008 - 1:37 pm

On Tue, 19 Aug 2008 20:45:53 +0200
"Rafael J. Wysocki" <rjw@sisk.pl> wrote:


hm, I wonder if this has any relation to
forcedeth-add-pci_enable_device-to-nv_resume.patch:


From: Simon Arlott <simon@fire.lp0.eu>

My NIC stops working after resuming from standby, it's not receiving any
interrupts.

Commit 25d90810ff49d2a63475776f24c74c6bb49b045f ([netdrvr] forcedeth:
reorder suspend/resume code) introduces pci_disable_device to nv_suspend,
but there's no corresponding pci_enable_device in nv_resume - so I added
one (copied from e1000).  This results in interrupts being re-enabled
after suspend.

However, the NIC (10de:0373) still doesn't work after resume.

Cc: Tobias Diedrich <ranma+kernel@tdiedrich.de>
Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/net/forcedeth.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff -puN drivers/net/forcedeth.c~forcedeth-add-pci_enable_device-to-nv_resume drivers/net/forcedeth.c
--- a/drivers/net/forcedeth.c~forcedeth-add-pci_enable_device-to-nv_resume
+++ a/drivers/net/forcedeth.c
@@ -5960,6 +5960,13 @@ static int nv_resume(struct pci_dev *pde
 
 	pci_set_power_state(pdev, PCI_D0);
 	pci_restore_state(pdev);
+	rc = pci_enable_device(pdev);
+	if (rc) {
+		printk(KERN_ERR "forcedeth: Cannot enable PCI device from suspend\n");
+		return rc;
+	}
+	pci_set_master(pdev);
+
 	/* ack any pending wake events, disable PME */
 	pci_enable_wake(pdev, PCI_D0, 0);
 
_


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] net: forcedeth use pci_choose_state instead of ..., Rafael J. Wysocki, (Sun Aug 17, 6:02 am)
Re: [PATCH] net: forcedeth use pci_choose_state instead of ..., Rafael J. Wysocki, (Sun Aug 17, 9:55 am)
Re: [PATCH] net: forcedeth use pci_choose_state instead of ..., Rafael J. Wysocki, (Sun Aug 17, 12:29 pm)
Re: [PATCH] net: forcedeth use pci_choose_state instead of ..., Rafael J. Wysocki, (Sun Aug 17, 12:34 pm)
Re: [PATCH] net: forcedeth use pci_choose_state instead of ..., Rafael J. Wysocki, (Sun Aug 17, 2:47 pm)
Re: [PATCH] net: forcedeth use pci_choose_state instead of ..., Rafael J. Wysocki, (Mon Aug 18, 3:22 am)
Re: [PATCH] net: forcedeth use pci_choose_state instead of ..., Rafael J. Wysocki, (Mon Aug 18, 3:08 pm)
Re: [PATCH] net: forcedeth use pci_choose_state instead of ..., Rafael J. Wysocki, (Tue Aug 19, 10:58 am)
[PATCH] forcedeth: Fix kexec regression, Rafael J. Wysocki, (Tue Aug 19, 11:45 am)
Re: [PATCH] forcedeth: Fix kexec regression, Andrew Morton, (Tue Aug 19, 1:37 pm)
Re: [PATCH] forcedeth: Fix kexec regression, Rafael J. Wysocki, (Tue Aug 19, 1:49 pm)
Re: [PATCH] net: forcedeth use pci_choose_state instead of ..., Rafael J. Wysocki, (Tue Aug 19, 2:09 pm)
Re: [PATCH] forcedeth: Fix kexec regression, Eric W. Biederman, (Wed Aug 20, 12:01 am)
Re: [PATCH] forcedeth: Fix kexec regression, Rafael J. Wysocki, (Wed Aug 20, 6:12 am)