Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Mar 1999 13:49:21 +0100 (BST)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Andrew Gallatin <gallatin@cs.duke.edu>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: kld questions
Message-ID:  <Pine.BSF.4.05.9903281345440.3322-100000@herring.nlsystems.com>
In-Reply-To: <14077.30470.231888.128618@grasshopper.cs.duke.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 27 Mar 1999, Andrew Gallatin wrote:

> 
> I'm interested in transforming our Trapeze/Myrinet device driver into
> a KLD, and I've got two specific questions about KLDs.
> 
> o How do I attach a PCI device after boot time?  Is this even
> supported?  Can anybody point me at any sample code?
> 
> o How do I make the KLD unload procedure wait until the module is
> ready to be unloaded?  Is it legal to sleep? 
> 
> The motivation behind this question is that the driver allocates its
> own memory for receives, and wraps external mbufs around that memory.
> That means it has its own mbuf reference & free routines.  It would be
> a bad thing if an mbuf the driver allocated was still floating around
> in the upper layers of the IP stack after the driver was unloaded --
> eventually, M_FREE would call the no-longer existent ext_free()
> function.

The current pci code has some remnants of old LKM support but I don't
think it includes anything functional.  The new pci code which I am slowly
working on will support loadable drivers (that is the whole point really).
This nearly works now with one missing piece (the system needs to re-probe
unrecognised devices after a new driver is loaded).

--
Doug Rabson				Mail:  dfr@nlsystems.com
Nonlinear Systems Ltd.			Phone: +44 181 442 9037




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9903281345440.3322-100000>