LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: danny@mailmij.org
To: linuxppc-dev@ozlabs.org
Subject: [PATCH] fix for firewire patch added in 2.6.17.2 that breaks things on ppc
Date: Mon, 7 Aug 2006 06:38:54 +0200	[thread overview]
Message-ID: <20060807063854.B641@luna.ellen.dexterslabs.com> (raw)
In-Reply-To: <20060805151050.B24484@luna.ellen.dexterslabs.com>; from danny@luna.ellen.dexterslabs.com on Sat, Aug 05, 2006 at 03:10:50PM +0200

[-- Attachment #1: Type: text/plain, Size: 614 bytes --]

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



[-- Attachment #2: ohci1394_save_state.patch --]
[-- Type: text/plain, Size: 987 bytes --]


    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@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;
 }
 

       reply	other threads:[~2006-08-07  5:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060805151050.B24484@luna.ellen.dexterslabs.com>
2006-08-07  4:38 ` danny [this message]
2006-08-08  5:05   ` [PATCH] fix for firewire patch added in 2.6.17.2 that breaks things on ppc Paul Mackerras
2006-08-08  5:37     ` danny
2006-08-08 16:50     ` danny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060807063854.B641@luna.ellen.dexterslabs.com \
    --to=danny@mailmij.org \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox