[24/50] firewire: fw-ohci: ignore failure of pci_set_power_state (fix suspend regression)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Greg KH
Date: Monday, September 24, 2007 - 9:21 am

From: Stefan Richter <stefanr@s5r6.in-berlin.de>

Minor regression since 2.6.22-rc1:  If the experimental firewire-ohci
driver instead of ohci1394 was loaded, iBook G3 and older PowerBooks
refused to suspend.

Same as commit 5511142870046a7bed947d51ec9b320856ee120a plus format
string touch-ups from 8a8cea2734808522f02941ea16125810ee42c9c7,
"firewire: missing newline in printk".  Original patch description:

Fixes (papers over) "Sleep problems with kernels >= 2.6.21 on powerpc",
http://lkml.org/lkml/2007/8/25/155.  The issue is that the FireWire
controller's pci_dev.current_state of iBook G3 and presumably older
PowerBooks is still in PCI_UNKNOWN instead of PCI_D0 when the firewire
driver's .suspend method is called.

Like it was suggested earlier in http://lkml.org/lkml/2006/10/24/13, we
do not fail .suspend anymore if pci_set_power_state failed.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/firewire/fw-ohci.c |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

--- a/drivers/firewire/fw-ohci.c
+++ b/drivers/firewire/fw-ohci.c
@@ -1934,14 +1934,12 @@ static int pci_suspend(struct pci_dev *p
 	free_irq(pdev->irq, ohci);
 	err = pci_save_state(pdev);
 	if (err) {
-		fw_error("pci_save_state failed with %d", err);
+		fw_error("pci_save_state failed with %d\n", err);
 		return err;
 	}
 	err = pci_set_power_state(pdev, pci_choose_state(pdev, state));
-	if (err) {
-		fw_error("pci_set_power_state failed with %d", err);
-		return err;
-	}
+	if (err)
+		fw_error("pci_set_power_state failed with %d\n", err);
 
 	return 0;
 }
@@ -1955,7 +1953,7 @@ static int pci_resume(struct pci_dev *pd
 	pci_restore_state(pdev);
 	err = pci_enable_device(pdev);
 	if (err) {
-		fw_error("pci_enable_device failed with %d", err);
+		fw_error("pci_enable_device failed with %d\n", err);
 		return err;
 	}
 

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

Messages in current thread:
[00/50] 2.6.22-stable review, Greg KH, (Mon Sep 24, 9:17 am)
[08/50] MTD: Makefile fix for mtdsuper, Greg KH, (Mon Sep 24, 9:20 am)
[12/50] 3w-9xxx: Fix dma mask setting, Greg KH, (Mon Sep 24, 9:20 am)
[14/50] JFFS2: fix write deadlock regression, Greg KH, (Mon Sep 24, 9:20 am)
[16/50] hwmon: End of I/O region off-by-one, Greg KH, (Mon Sep 24, 9:20 am)
[17/50] Fix debug regression in video/pwc, Greg KH, (Mon Sep 24, 9:20 am)
[18/50] splice: fix direct splice error handling, Greg KH, (Mon Sep 24, 9:20 am)
[20/50] disable sys_timerfd(), Greg KH, (Mon Sep 24, 9:21 am)
[21/50] afs: mntput called before dput, Greg KH, (Mon Sep 24, 9:21 am)
[24/50] firewire: fw-ohci: ignore failure of pci_set_power ..., Greg KH, (Mon Sep 24, 9:21 am)
[25/50] futex_compat: fix list traversal bugs, Greg KH, (Mon Sep 24, 9:21 am)
[26/50] Leases can be hidden by flocks, Greg KH, (Mon Sep 24, 9:21 am)
[28/50] nfs: fix oops re sysctls and V4 support, Greg KH, (Mon Sep 24, 9:21 am)
[31/50] Correctly close old nfsd/lockd sockets., Greg KH, (Mon Sep 24, 9:21 am)
[32/50] Fix race with shared tag queue maps, Greg KH, (Mon Sep 24, 9:21 am)
[34/50] fix realtek phy id in forcedeth, Greg KH, (Mon Sep 24, 9:21 am)
[35/50] Fix decnet device address listing., Greg KH, (Mon Sep 24, 9:21 am)
[36/50] Fix device address listing for ipv4., Greg KH, (Mon Sep 24, 9:22 am)
[37/50] Fix inet_diag OOPS., Greg KH, (Mon Sep 24, 9:22 am)
[38/50] Fix IPV6 append OOPS., Greg KH, (Mon Sep 24, 9:22 am)
[39/50] Fix IPSEC AH4 options handling, Greg KH, (Mon Sep 24, 9:22 am)
[41/50] : Fix IPV6 DAD handling, Greg KH, (Mon Sep 24, 9:22 am)
[42/50] Fix ipv6 source address handling., Greg KH, (Mon Sep 24, 9:22 am)
[43/50] Fix oops in vlan and bridging code, Greg KH, (Mon Sep 24, 9:22 am)
[44/50] Fix tc_ematch kbuild, Greg KH, (Mon Sep 24, 9:22 am)
[45/50] Handle snd_una in tcp_cwnd_down(), Greg KH, (Mon Sep 24, 9:22 am)
[46/50] Fix TCP DSACK cwnd handling, Greg KH, (Mon Sep 24, 9:22 am)
[48/50] Fix pktgen src_mac handling., Greg KH, (Mon Sep 24, 9:22 am)
[49/50] Fix sparc64 v100 platform booting., Greg KH, (Mon Sep 24, 9:22 am)
Re: [00/50] 2.6.22-stable review, Greg KH, (Mon Sep 24, 9:31 am)
Re: [00/50] 2.6.22-stable review, Chris Wedgwood, (Mon Sep 24, 9:44 am)
Re: [00/50] 2.6.22-stable review, Chris Wedgwood, (Mon Sep 24, 9:46 am)
Re: [00/50] 2.6.22-stable review, Greg KH, (Mon Sep 24, 10:13 am)
Re: [00/50] 2.6.22-stable review, Greg KH, (Mon Sep 24, 10:14 am)
Re: [37/50] Fix inet_diag OOPS., Dan Merillat, (Mon Sep 24, 3:03 pm)
Re: [37/50] Fix inet_diag OOPS., Patrick McHardy, (Mon Sep 24, 9:03 pm)