Re: [PATCH] ricoh_mmc: Use suspend/resume_noirq (v2) (resend)

From: Rafael J. Wysocki
Date: Sat Jan 10 2009 - 07:32:52 EST


On Saturday 10 January 2009, Philip Langdale wrote:
>
> On Thu, 8 Jan 2009 23:14:52 +0100, "Rafael J. Wysocki" <rjw@xxxxxxx> wrote:
> > On Wednesday 07 January 2009, philipl@xxxxxxxxx wrote:
[...]
> > dependencies between the devices are, so can you please explain that
> > to me?
>
> I hope my write up answers this question.

I think they are, though I have to read them more thoroughly yet.

> > That said, if you want to suspend-resume ricoh_mmc with interrupts
> > disabled,
> > please use the legacy PCI .suspend_late() and .resume_early() callbacks
> for
> > that, since in the new framework the core will carry out some standard PM
> > operations in addition to your .suspend_noirq() and .resume_noirq(). It
> > may
> > not be what you want in this case, though.
>
> I'd need to know what those other operations are. I originally wrote this
> patch with suspend_late and resume_early but the first pm_ops patch I saw
> removed those. Are you now saying that both suspend_late/resume_early and
> noirq callbacks are supported now.

Yes, they are. You implement either the "old" ones (->suspen(), ->resume(),
->suspend_late(), ->resume_early() in struct pci_driver) and even if only one of
them is defined, the "legacy" handling will be used for the other operations
too, so the existing drivers' code is not affected, or the "new" ones (the pm
object).

> It's all a bit confusing :-)

Yes, it is, unfortunately. There are a couple of reasons, one of them being
that the code has only been finished recently and another that the whole
concept changed slightly just before 2.6.28, when we discovered a mode of
failure that had not been known before and it had to be taken into account.

I'm now going to finally write some documentation. :-)

Thanks,
Rafael
--
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/