Re: Totally broken PCI PM calls

From: Paul Mackerras
Date: Sun Oct 10 2004 - 23:26:36 EST


Linus Torvalds writes:

> And they are unbroken again (well, at least they work for me again).
> Partly by the PM_ renumbering under discussion.

Interesting. I find that with suspend-to-ram, USB keyboards don't
work after resume, and that the system will hang on resume if you
remove a USB device during sleep.

Are you using suspend-to-ram or suspend-to-disk?

> > The problem I have at the moment is that PCI drivers get asked to go
> > to D3 for both suspend-to-ram and suspend-to-disk. In particular the
> > radeonfb driver wants to do different things in these two cases.
>
> Hey, I don't disagree. But I pointed out why it's done the way it is done.
> I even told you what can be done about it - so please argue _those_ points
> instead of just ignoring them.

OK, how about we pass a struct that contains both the target system
power state and the target device power state? That would fit in 32
bits.

For now (i.e. 2.6.9), could we have the following patch? It only
affects suspend-to-disk, and it tells the drivers that we are going to
D3cold (4) when we are doing suspend-to-disk.

Signed-off-by: Paul Mackerras <paulus@xxxxxxxxx>

diff -urN linux-2.5/drivers/pci/pci-driver.c pmac-2.5/drivers/pci/pci-driver.c
--- linux-2.5/drivers/pci/pci-driver.c 2004-10-04 13:31:01.000000000 +1000
+++ pmac-2.5/drivers/pci/pci-driver.c 2004-10-11 14:15:27.986286792 +1000
@@ -307,7 +307,7 @@
[PM_SUSPEND_ON] = 0,
[PM_SUSPEND_STANDBY] = 1,
[PM_SUSPEND_MEM] = 3,
- [PM_SUSPEND_DISK] = 3,
+ [PM_SUSPEND_DISK] = 4,
};

if (state >= sizeof(state_conversion) / sizeof(state_conversion[1]))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/