tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
some pmf improvements
Many NIC drivers activate/deactivate power by calling their bus
front-ends through callbacks called, say, sc_enable/sc_disable.
These days, we have PMF for controlling power, and I would
like to replace the sc_enable/sc_disable calls with calls to
pmf_device_resume/pmf_device_suspend.
It is necessary to distinguish devices that suspend themselves from
devices that are suspended by either the operator using, say, drvctl(8),
or by a system power-state transition. Self-suspended devices are
eligible to wake for any purpose at any time, but other-suspended devices
may only resume by command of the system/operator.
I'm going to add a 'flags' argument to pmf_device_suspend()/_resume()
and their callers, and a flag called PMF_F_SELF that indicates driver
self-suspension.
A flag in the device_t, DVF_SELF_SUSPENDED, will indicate a self-suspended
device. The DVF_SELF_SUSPENDED flag is cleared if a self-suspended device
is subsequently suspended by the system/operator, or if it is resumed.
Also, I put a process to sleep if it calls pmf_device_resume(, PMF_F_SELF)
on a device that was suspended by the system/operator. In this way,
I stop programs such as wpa_supplicant(8) from interfering with device
suspension by modifying IFF_UP.
Comments? Questions?
Dave
--
David Young OJC Technologies
dyoung%ojctech.com@localhost Urbana, IL * (217) 278-3933 ext 24
Home |
Main Index |
Thread Index |
Old Index