Re: [patch/rft 2.6.17-rc5-git 3/6] PM_EVENT_PRETHAW, handle in IDE and PCI

David Brownell
2006-06-07T00:51:26Z

On Tuesday 30 May 2006 12:21 pm, Pavel Machek wrote:
> Hi!
>
> > @@ -1227,7 +1227,9 @@ static int generic_ide_suspend(struct de
> > rq.special = &args;
> > rq.pm = &rqpm;
> > rqpm.pm_step = ide_pm_state_start_suspend;
> > - rqpm.pm_state = state.event;
> > + if (mesg.event == PM_EVENT_PRETHAW)
> > + mesg.event = PM_EVENT_FREEZE;
> > + rqpm.pm_state = mesg.event;
> >
>
> Actually it would be nicer not to modify mesg.event... And perhaps I'd
> move this check lower -- to be consistent with 'low level driver gets
> full info' idea.

Instead, it's consistent with the "smallest obviously correct patch"
principle. Didn't want to end up overhauling IDE, especially since it
doesn't seem to be a class where resume() does anything interesting.

> (Or is it checked at too many places?)

Notice that "rqpm.pm_state" confusion ... it's checked indirectly
from there. Event codes are not states.