Whether or not to resume a suspended device when an I/O request comes
in is a policy decision, and there could be cases where the user wants
I/O requests to be blocked, or to fail, or to be dropped while the
device is suspended, even for runtime power management. For example,
a sound card could be suspended due to a low-battery condition, and in
that case you would want the driver to just drop any data that
userspace tries to write to the soundcard.
Is this actually a real problem? I would think the policy would be
"block" for block devices (pun not intended :), "drop" for network
devices, etc.
How did the device get suspended if it didn't have a driver? If it
did have a driver, why didn't the bind attempt fail?
Suppose the device-model core code simply blocked all bind and unbind
requests while suspend is under way, until resume is finished.
Wouldn't that solve the problem?
Paul.
-