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



> > 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?

One problem is that suspend and resume functions are often
bus dependent but most shutdown (and pmf_class_*()) functions
are bus independent.

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


Home | Main Index | Thread Index | Old Index