2006-08-18 05:21:49

by Danny Tholen

[permalink] [raw]
Subject: [PATCH] fix for recently added firewire patch that breaks things on ppc

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

This moves the save state to before the pmac specific code.
Please apply before 2.6.18.

Signed-off-by: Danny Tholen <obiwan at mailmij.org>

--- linux-2.6.17.7/drivers/ieee1394/ohci1394.c~ 2006-08-09 09:00:32.556422070 -0400
+++ linux-2.6.17.7/drivers/ieee1394/ohci1394.c 2006-08-09 09:02:53.546090923 -0400
@@ -3548,6 +3548,8 @@

static int ohci1394_pci_suspend (struct pci_dev *pdev, pm_message_t state)
{
+ pci_save_state(pdev);
+
#ifdef CONFIG_PPC_PMAC
if (machine_is(powermac)) {
struct device_node *of_node;
@@ -3559,8 +3561,6 @@
}
#endif

- pci_save_state(pdev);
-
return 0;
}


2006-08-18 06:07:52

by Stefan Richter

[permalink] [raw]
Subject: Re: [PATCH] fix for recently added firewire patch that breaks things on ppc

Danny Tholen wrote:
> Recently a patch was added for preliminary suspend/resume
> handling on !PPC_PMAC. However, this broke both suspend and firewire
> on powerpc because it saves the pci state after the device has already
> been disabled.
>
> This moves the save state to before the pmac specific code.
> Please apply before 2.6.18.
>
> Signed-off-by: Danny Tholen <obiwan at mailmij.org>

This fix should go into 2.6.17.x and 2.6.16.yy too. (I sent the patch
with the regression also to Adrian recently.)

> --- linux-2.6.17.7/drivers/ieee1394/ohci1394.c~ 2006-08-09 09:00:32.556422070 -0400
> +++ linux-2.6.17.7/drivers/ieee1394/ohci1394.c 2006-08-09 09:02:53.546090923 -0400
> @@ -3548,6 +3548,8 @@
>
> static int ohci1394_pci_suspend (struct pci_dev *pdev, pm_message_t state)
> {
> + pci_save_state(pdev);
> +
> #ifdef CONFIG_PPC_PMAC
> if (machine_is(powermac)) {
> struct device_node *of_node;
> @@ -3559,8 +3561,6 @@
> }
> #endif
>
> - pci_save_state(pdev);
> -
> return 0;
> }
>

--
Stefan Richter
-=====-=-==- =--- =--=-
http://arcgraph.de/sr/

2006-08-18 06:18:38

by Danny Tholen

[permalink] [raw]
Subject: Re: [PATCH] fix for recently added firewire patch that breaks things on ppc

On Fri, Aug 18, 2006 at 08:04:55AM +0200, Stefan Richter wrote:
> Danny Tholen wrote:
> > Recently a patch was added for preliminary suspend/resume
> > handling on !PPC_PMAC. However, this broke both suspend and firewire
> > on powerpc because it saves the pci state after the device has already
> > been disabled.
> >
> > This moves the save state to before the pmac specific code.
> > Please apply before 2.6.18.
> >
> > Signed-off-by: Danny Tholen <obiwan at mailmij.org>
>
> This fix should go into 2.6.17.x and 2.6.16.yy too. (I sent the patch
> with the regression also to Adrian recently.)
>
I'm sorry I should have mentioned that I already sent it to Greg KH.

Danny