From: Chris Wright Date: Fri, 23 Jun 2006 18:20:26 +0000 (-0700) Subject: ohci1394 suspend/resume fix from Robert Hancock X-Git-Tag: v2.6.17.2~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=22562dd954725ff62cd51d30852e099bd384f1fa;p=thirdparty%2Fkernel%2Fstable-queue.git ohci1394 suspend/resume fix from Robert Hancock --- diff --git a/queue-2.6.17/ohci1394-fix-broken-suspend-resume-in-ohci1394.patch b/queue-2.6.17/ohci1394-fix-broken-suspend-resume-in-ohci1394.patch new file mode 100644 index 00000000000..b9bcd1b8228 --- /dev/null +++ b/queue-2.6.17/ohci1394-fix-broken-suspend-resume-in-ohci1394.patch @@ -0,0 +1,69 @@ +From stable-bounces@linux.kernel.org Thu Jun 22 19:37:31 2006 +Date: Thu, 22 Jun 2006 20:33:26 -0600 +From: Robert Hancock +To: stable@kernel.org +Cc: Ben Collins , Jody McIntyre +Subject: ohci1394: Fix broken suspend/resume in ohci1394 + +I've been experimenting to track down the cause of suspend/resume +problems on my Compaq Presario X1050 laptop: + +http://bugzilla.kernel.org/show_bug.cgi?id=6075 + +Essentially the ACPI Embedded Controller and keyboard controller would +get into a bizarre, confused state after resume. + +I found that unloading the ohci1394 module before suspend and reloading +it after resume made the problem go away. Diffing the dmesg output from +resume, with and without the module loaded, I found that with the module +loaded I was missing these: + +PM: Writing back config space on device 0000:02:00.0 at offset 1. (Was +2100080, writing 2100007) +PM: Writing back config space on device 0000:02:00.0 at offset 3. (Was +0, writing 8008) +PM: Writing back config space on device 0000:02:00.0 at offset 4. (Was +0, writing 90200000) +PM: Writing back config space on device 0000:02:00.0 at offset 5. (Was +1, writing 2401) +PM: Writing back config space on device 0000:02:00.0 at offset f. (Was +20000100, writing 2000010a) + +The default PCI driver performs the pci_restore_state when no driver is +loaded for the device. When the ohci1394 driver is loaded, it is +supposed to do this, however it appears not to do so. + +I created the patch below and tested it, and it appears to resolve the +suspend problems I was having with the module loaded. I only added in +the pci_save_state and pci_restore_state - however, though I know little +of this hardware, surely the driver should really be doing more than +this when suspending and resuming? Currently it does almost nothing, +what if there are commands in progress, etc? + +Signed-off-by: Robert Hancock +Signed-off-by: Chris Wright +--- + +--- + drivers/ieee1394/ohci1394.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- linux-2.6.17.1.orig/drivers/ieee1394/ohci1394.c ++++ linux-2.6.17.1/drivers/ieee1394/ohci1394.c +@@ -3539,6 +3539,7 @@ static int ohci1394_pci_resume (struct p + } + #endif /* CONFIG_PPC_PMAC */ + ++ pci_restore_state(pdev); + pci_enable_device(pdev); + + return 0; +@@ -3558,6 +3559,8 @@ static int ohci1394_pci_suspend (struct + } + #endif + ++ pci_save_state(pdev); ++ + return 0; + } + diff --git a/queue-2.6.17/series b/queue-2.6.17/series index ab53e538fb1..28e02c51a4c 100644 --- a/queue-2.6.17/series +++ b/queue-2.6.17/series @@ -15,3 +15,4 @@ bcm43xx-init-fix-for-possible-machine-check.patch uml-fix-uptime.patch ipv6-fix-source-address-selection.patch ipv6-addrconf-fix-default-source-address-selection-without-config_ipv6_privacy.patch +ohci1394-fix-broken-suspend-resume-in-ohci1394.patch