[PATCH] fix for firewire patch added in 2.6.17.2 that breaks things on ppc

danny at mailmij.org danny at mailmij.org
Mon Aug 7 14:38:54 EST 2006


Hello,
I sent this to Ben earlier but forgot to cc this list:

> 
> Sleep broke on my ibook G3 with 2.6.17. After some tests it seemed it only broke when I had used my 
> iSight. Plugging it after a sleep/resume cycle would sometimes instantly hang the machine.
> 
> The problem appeared to result from a patch added in 2.6.17.2, where a
> pci_save_state(pdev);
> is called after
>  pmac_call_feature(PMAC_FTR_1394_ENABLE, of_node, 0, 0);
> 
> resuming shows that the corresponding pci_restore_state is writing all ffffffff to the config space. 
> Which is probably not a good idea.
> 

Patch is attached

Danny


-------------- next part --------------

    2.6.17.2 contained a patch for preliminary suspend/resume 
    handling on !PPC_PMAC. However, this broke suspend and firewire
    on powerpc because it saves the state after the device has already
    been disabled.

    Firewire works perfectly through suspend on my ibook, so save/restore
    state is not needed there.
    
    Signed-off-by: Danny Tholen <obiwan at mailmij.org>

--- linux-2.6.17.7/drivers/ieee1394/ohci1394.c~	2006-08-03 10:00:01.875855084 -0400
+++ linux-2.6.17.7/drivers/ieee1394/ohci1394.c	2006-08-03 10:08:24.274059577 -0400
@@ -3537,9 +3537,9 @@
 		if (of_node)
 			pmac_call_feature (PMAC_FTR_1394_ENABLE, of_node, 0, 1);
 	}
-#endif /* CONFIG_PPC_PMAC */
-
+#else
 	pci_restore_state(pdev);
+#endif /* CONFIG_PPC_PMAC */
 	pci_enable_device(pdev);
 
 	return 0;
@@ -3557,10 +3557,9 @@
 		if (of_node)
 			pmac_call_feature(PMAC_FTR_1394_ENABLE, of_node, 0, 0);
 	}
-#endif
-
+#else
 	pci_save_state(pdev);
-
+#endif /* CONFIG_PPC_PMAC */
 	return 0;
 }
 


More information about the Linuxppc-dev mailing list