cvs commit: src/sys/modules/iwi Makefile src/sys/dev/iwi
if_iwi.c if_iwireg.h if_iwivar.h
John Baldwin
jhb at freebsd.org
Mon Nov 21 15:19:13 GMT 2005
On Saturday 19 November 2005 04:42 pm, M. Warner Losh wrote:
> In message: <00ca01c5ed4a$86b0e570$0300a8c0 at COMETE>
>
> "Damien Bergamini" <damien.bergamini at free.fr> writes:
> : | I'm a little concerned about this change. The notes claim the firmware
> : | is loaded after a resume from the filesystem as well as at
> : | initialization time. So your driver is then assuming the ATA driver is
> : | fully reinitialized before your driver's resume method can be called.
> : | You can't assume that since it's not a child device of ATA.
> :
> : Wouldn't the call to VOP_READ block until "/" is recovered in that case ?
>
> If it blocks until "/" is recovered, then the system will block. We
> presently restore single threaded, and if anything in there blocks, we
> wait until it unblocks. Interrupts are runnable, so some things would
> still work...
Devices get resumed based on their relative positions in the device tree which
is rather arbitrary (it depends on how the PCI busses are laid out on a
machine for example). You really cannot know that the kernel is back up and
running well enough to do a VOP_READ (which is _synchronous_, not magically
async, so you'd need to create your own kthread to even try to get the
behavior you seem to want) until all the hardware is up. The easiest way to
accomplish this is for your driver to send a message to devd requesting that
the firmware be reloaded on resume since devd won't run until the kernel is
fully back up.
--
John Baldwin <jhb at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" = http://www.FreeBSD.org
More information about the cvs-src
mailing list