Re: suspend/resume support for driver requires an external firmware
From: Patrick Mochel
Date: Fri Sep 24 2004 - 02:34:33 EST
On Fri, 24 Sep 2004, Zhu, Yi wrote:
> Choice 1. In 2.5 kernel, there used to be a ->save_state method in the
> device PM interface. From the "not yet updated" document
> (Documentation/power/pci.txt), this function can be used as "a notification
> that it(the device) may be entering a sleep state in the near future". If we
> take back this interface, the problem can be solved. That is, the driver
> loads firmware into memory in ->save_state and frees the memory in ->resume.
> The deadlock is resolved without any runtime memory wasted.
>
> patch embeded at the end of the mail.
We talked about this in Ottawa a few months ago, and I think this is the
right approach. Note though, that I think it needs to be more complete:
- There needs to be restore_state() to be symmetic.
- There needs to be the proper failure recovery
If save_state() or suspend() fails, every device that has had their
state saved needs to be restored.
- It needs to be called for all power management requests.
- The PCI implementation should call pci_save_state() in it, instead of in
->suspend().
It would be great if you could add these things. Otherwise, I'll add it to
my TODO list..
Thanks,
Pat
-
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/