Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev/pci

On Sun, Sep 06, 2009 at 09:42:08AM +0900, Izumi Tsutsui wrote:
> > > XXX: should these pmf(9) calls be moved into MI attach functions
> > > XXX: using function pointers for suspend and resume passed via softc?
> > 
> > I think that we would add callbacks to many, many softc's, like we did
> > with the enable/disable routines.  Lots of code would be duplicated.  I
> > am gradually replacing those routines with self-suspension.  PMF should
> > handle bus-independent/bus-dependent suspend/resume, too.
> > 
> > Let the programmer of drivers add a bus-dependent PMF hook in the bus
> > attachment routine, and a bus-independent PMF hook in the generic attach
> > routine.  Something like this, for example,
> Hmm, is multiple pmf_device_register*(9) calls against
> the same device_t allowed?  How should they be de-registered?

I'm suggesting different calls to register the bus-dependent &
bus-independent routines.

> If multiple registration is allowed, it might be better to have
> pmf_device_register_shutdown() or so.

I think we need a separate routine for registering shutdown handlers
regardless. pmf_device_register1() takes NULL suspend/resume handlers to
mean, "no driver intervention necessary to suspend/resume".


David Young             OJC Technologies      Urbana, IL * (217) 278-3933

Home | Main Index | Thread Index | Old Index