Hi,
Thus wrote Jared D. McNeill (jmcneill@invisible.ca):
> On Thu, 20 Dec 2007, S.P.Zeidler wrote:
> >While I talk my lapdog into resuming without a screen of pretty stripes
> >or measles, could other people with an ex whose machine generally
> >is not acting so difficult try if the patch works for them, ie if suspend
> >and resume work as expected (and if the ethernet works after resume, too
> >:) ?
> >Especially people with a cardbus ex since I don't have one of these
> >(mine's PCI).
>
> The bus frontend is really responsible for registering power handlers, as
> there are typically bus-specific tasks to be done (restoring PCI conf
> registers on resume, for example). It's fine to provide these functions in
> elinkxl though -- if you are certain that no bus specific tasks need to be
> done, the bus attach function can pass in the callbacks provided by
> elinkxl.
The thingie does a trick. It writes the bus specific functions into
sc->disable and sc->enable and calls these eventually, too.
FE: ex_suspend calls ex_power, ex_power calls ex_stop, ex_stop calls
ex_disable next to last and ex_disable only does:
if (sc->enabled == 1 && sc->disable != NULL) {
(*sc->disable)(sc);
sc->enabled = 0;
}
ie runs whatever the bus needs to save state and power it down.
Not my bright idea of course, the previous powerhook already had
everything in place but the different gift wrapping for the suspend/resume
functions.
HTH,
spz
--
spz@serpens.de (S.P.Zeidler)