mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* set power state of firewire host during suspend
@ 2006-09-05  8:14 Pavel Machek
  2006-09-05 10:36 ` Stefan Richter
  2006-09-07 20:05 ` Stefan Richter
  0 siblings, 2 replies; 4+ messages in thread
From: Pavel Machek @ 2006-09-05  8:14 UTC (permalink / raw)
  To: bcollins, scjody, linux1394-devel, kernel list, Andrew Morton

Put firewire host controller in PCI Dx state for system suspend.
(I was not able to measure any power savings, but it sounds like right
thing to do, anyway.)

Signed-off-by: Pavel Machek <pavel@suse.cz>

---
commit 099774f95904ca16463b9383d812d20621553555
tree 9173983914ccf142ce948dc03f7ae493b489c28f
parent c0aceb8cda90a681ee8028e22b45c00e98b7c33c
author <pavel@amd.ucw.cz> Tue, 05 Sep 2006 10:13:37 +0200
committer <pavel@amd.ucw.cz> Tue, 05 Sep 2006 10:13:37 +0200

 drivers/ieee1394/ohci1394.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c
index 448df27..12b6dfa 100644
--- a/drivers/ieee1394/ohci1394.c
+++ b/drivers/ieee1394/ohci1394.c
@@ -3565,6 +3565,7 @@ static int ohci1394_pci_suspend (struct 
 	}
 #endif
 
+	pci_set_power_state(pdev, pci_choose_state(pdev, state));
 	return 0;
 }
 

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: set power state of firewire host during suspend
  2006-09-05  8:14 set power state of firewire host during suspend Pavel Machek
@ 2006-09-05 10:36 ` Stefan Richter
  2006-09-05 11:03   ` Pavel Machek
  2006-09-07 20:05 ` Stefan Richter
  1 sibling, 1 reply; 4+ messages in thread
From: Stefan Richter @ 2006-09-05 10:36 UTC (permalink / raw)
  To: Pavel Machek
  Cc: bcollins, scjody, linux1394-devel, kernel list, Andrew Morton

Pavel Machek wrote:
> --- a/drivers/ieee1394/ohci1394.c
> +++ b/drivers/ieee1394/ohci1394.c
> @@ -3565,6 +3565,7 @@ static int ohci1394_pci_suspend (struct 
>  	}
>  #endif
>  
> +	pci_set_power_state(pdev, pci_choose_state(pdev, state));
>  	return 0;
>  }
>  
> 

Does this work on PPC_PMAC? Note the platform code before #endif.
http://www.linux-m32r.org/lxr/http/source/drivers/ieee1394/ohci1394.c?v=2.6.18-rc5-mm1#L3554
-- 
Stefan Richter
-=====-=-==- =--= --=-=
http://arcgraph.de/sr/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: set power state of firewire host during suspend
  2006-09-05 10:36 ` Stefan Richter
@ 2006-09-05 11:03   ` Pavel Machek
  0 siblings, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2006-09-05 11:03 UTC (permalink / raw)
  To: Stefan Richter
  Cc: bcollins, scjody, linux1394-devel, kernel list, Andrew Morton

Hi!

> Pavel Machek wrote:
> > --- a/drivers/ieee1394/ohci1394.c
> > +++ b/drivers/ieee1394/ohci1394.c
> > @@ -3565,6 +3565,7 @@ static int ohci1394_pci_suspend (struct 
> >  	}
> >  #endif
> >  
> > +	pci_set_power_state(pdev, pci_choose_state(pdev, state));
> >  	return 0;
> >  }
> >  
> > 
> 
> Does this work on PPC_PMAC? Note the platform code before #endif.
> http://www.linux-m32r.org/lxr/http/source/drivers/ieee1394/ohci1394.c?v=2.6.18-rc5-mm1#L3554


No idea, I know very little about PMACs. They still have PCI, right?
Why does it need hooks into drivers like this?
								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: set power state of firewire host during suspend
  2006-09-05  8:14 set power state of firewire host during suspend Pavel Machek
  2006-09-05 10:36 ` Stefan Richter
@ 2006-09-07 20:05 ` Stefan Richter
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Richter @ 2006-09-07 20:05 UTC (permalink / raw)
  To: Pavel Machek
  Cc: bcollins, scjody, linux1394-devel, kernel list, Andrew Morton

Pavel Machek wrote:
> Put firewire host controller in PCI Dx state for system suspend.
> (I was not able to measure any power savings, but it sounds like right
> thing to do, anyway.)
> 
> Signed-off-by: Pavel Machek <pavel@suse.cz>
[...]
> --- a/drivers/ieee1394/ohci1394.c
> +++ b/drivers/ieee1394/ohci1394.c
> @@ -3565,6 +3565,7 @@ static int ohci1394_pci_suspend (struct 
>  	}
>  #endif
>  
> +	pci_set_power_state(pdev, pci_choose_state(pdev, state));
>  	return 0;
>  }

The order with existing PPC_PMAC code needs to be swapped. And the
resume hook should set the power state too, right? I will post an update
patch soon.
-- 
Stefan Richter
-=====-=-==- =--= --===
http://arcgraph.de/sr/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-09-07 20:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-05  8:14 set power state of firewire host during suspend Pavel Machek
2006-09-05 10:36 ` Stefan Richter
2006-09-05 11:03   ` Pavel Machek
2006-09-07 20:05 ` Stefan Richter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®