Skip to contentSkip to conversation

set power state of firewire host during suspend

PATCH Pavel Machek 2 participants 4 messages Sep 5, 2006 – Sep 7, 2006

lore
Share & tools
lore
#0 lore raw

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.)

---
commit 099774f95904ca16463b9383d812d20621553555 tree 9173983914ccf142ce948dc03f7ae493b489c28f parent c0aceb8cda90a681ee8028e22b45c00e98b7c33c author <[email protected]> Tue, 05 Sep 2006 10:13:37 +0200 committer <[email protected]> Tue, 05 Sep 2006 10:13:37 +0200

 drivers/ieee1394/ohci1394.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/ieee1394/ohci1394.c +1 -0
index 448df27..12b6dfa 100644
@@ -3565,6 +3565,7 @@ static int ohci1394_pci_suspend (struct 
 	}
 #endif
 
+	pci_set_power_state(pdev, pci_choose_state(pdev, state));
 	return 0;
 }
 
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#1 lore raw

drivers/ieee1394/ohci1394.c static int ohci1394_pci_suspend (struct · line 3571

Quoted 11 lines · Pavel Machek
drivers/ieee1394/ohci1394.c +1 -0
@@ -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

Signature · 3 lines
Stefan Richter
-=====-=-==- =--= --=-=
http://arcgraph.de/sr/
#2 lore raw

Hi!

Quoted 7 lines
Quoted 6 lines · Pavel Machek
drivers/ieee1394/ohci1394.c +0 -0
@@ -3565,6 +3565,7 @@ static int ohci1394_pci_suspend (struct 
 	}
 #endif
 
Quoted 8 lines

drivers/ieee1394/ohci1394.c static int ohci1394_pci_suspend (struct · line 3571

Quoted 5 lines
drivers/ieee1394/ohci1394.c +1 -0
+	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

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#3 lore raw
In reply to Pavel Machek
Quoted 5 lines · Pavel Machek

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.)

[...]

drivers/ieee1394/ohci1394.c static int ohci1394_pci_suspend (struct · line 3570

Quoted 9 lines
drivers/ieee1394/ohci1394.c +1 -0
@@ -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.

Signature · 3 lines
Stefan Richter
-=====-=-==- =--= --===
http://arcgraph.de/sr/