[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <458672F2.4050101@myri.com>
Date: Mon, 18 Dec 2006 11:52:34 +0100
From: Brice Goglin <brice@...i.com>
To: Jeff Garzik <jeff@...zik.org>, netdev@...r.kernel.org
Subject: [PATCH 5/5] myri10ge: handle failures in suspend and resume
On suspend, handle pci_set_power_state errors, and on resume
handle failures in pci_resume_state().
Signed-off-by: Brice Goglin <brice@...i.com>
Signed-off-by: Stephen Hemminger <shemminger@...l.org>
---
drivers/net/myri10ge/myri10ge.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
Index: linux-rc/drivers/net/myri10ge/myri10ge.c
===================================================================
--- linux-rc.orig/drivers/net/myri10ge/myri10ge.c 2006-12-18 10:32:05.000000000 +0100
+++ linux-rc/drivers/net/myri10ge/myri10ge.c 2006-12-18 10:35:13.000000000 +0100
@@ -2540,8 +2540,8 @@
myri10ge_dummy_rdma(mgp, 0);
pci_save_state(pdev);
pci_disable_device(pdev);
- pci_set_power_state(pdev, pci_choose_state(pdev, state));
- return 0;
+
+ return pci_set_power_state(pdev, pci_choose_state(pdev, state));
}
static int myri10ge_resume(struct pci_dev *pdev)
@@ -2564,12 +2564,14 @@
return -EIO;
}
- pci_restore_state(pdev);
+ status = pci_restore_state(pdev);
+ if (status)
+ return status;
status = pci_enable_device(pdev);
- if (status < 0) {
+ if (status) {
dev_err(&pdev->dev, "failed to enable device\n");
- return -EIO;
+ return status;
}
pci_set_master(pdev);
-
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