Skip to content

firewire, ieee1394: bus power lost after resume (PPC PMac)

Stefan Richter linuxppc-dev lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4firewire: fw-ohci: switch on bus power after resume on PPC PMacdrivers/firewire/fw-ohci.c+6 -20 replies
2/4firewire: fw-ohci: refactor probe, remove, suspend, resumedrivers/firewire/fw-ohci.c+42 -580 replies
3/4ieee1394: ohci1394: switch on bus power after resume on PPC PMacdrivers/ieee1394/ohci1394.c+6 -20 replies
4/4ieee1394: ohci1394: refactor probe, remove, suspend, resumedrivers/ieee1394/ohci1394.c+49 -640 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] firewire, ieee1394: bus power lost after resume (PPC PMac)
Quoted 20 lines · I wrote:

Benjamin Herrenschmidt wrote:
[...]

Quoted 4 lines
Quoted 4 lines
(quoted diff) +0 -0
@@ -2211,6 +2241,16 @@ static int pci_suspend(struct pci_dev *p
 	if (err)
 		fw_error("pci_set_power_state failed with %d\n", err);
 
Quoted 11 lines

Review static int pci_suspend(struct pci_dev *p · line 2252

Quoted 9 lines
(quoted diff) +9 -0
+/* PowerMac suspend code comes last */
+#ifdef CONFIG_PPC_PMAC
+	if (machine_is(powermac)) {
+		struct device_node *ofn = pci_device_to_OF_node(pdev);
+
+		if (ofn)
+			pmac_call_feature(PMAC_FTR_1394_ENABLE, ofn, 0, 0);
+	}
+#endif /* CONFIG_PPC_PMAC */

I wonder why we don't do the cable power thingy here...

I don't know.

Quoted 7 lines

I tested with a bus powered device now. Actually, suspend to RAM switches off cable power nevertheless, but resume does not switch it on anymore...

Of course the same is true with ohci1394. Why did nobody ever complain? I suppose the last two users of FireWire + Linux + UniNorth rev01 don't use cable power or don't suspend and resume.

At least this is what the 1st generation PowerBook G4 does. I don't know if other PPC_PMAC are affected.

I suggest we explicitly switch cable power on in .resume() but also explicitly switch cable power off in .suspend(), so that we don't get any surprises. (Hardware bugs related to these platform features excepted.) Patches follow:

1/4 firewire: fw-ohci: switch on bus power after resume on PPC PMac 2/4 firewire: fw-ohci: refactor probe, remove, suspend, resume 3/4 ieee1394: ohci1394: switch on bus power after resume on PPC PMac 4/4 ieee1394: ohci1394: refactor probe, remove, suspend, resume

 drivers/firewire/fw-ohci.c  |   96 +++++++++++++------------------
 drivers/ieee1394/ohci1394.c |  109 ++++++++++++++++--------------------
 2 files changed, 91 insertions(+), 114 deletions(-)
Signature · 3 lines
Stefan Richter
-=====-==--- --== ----=
http://arcgraph.de/sr/