Subject: Re: CFR: The Auto-Generation Block/Character Device Switch Tables
To: Bill Studenmund <wrstuden@netbsd.org>
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
List: tech-kern
Date: 05/10/2002 00:05:01
At 10:21 Uhr -0700 9.5.2002, Bill Studenmund wrote:
>> The iwm_fd driver on NetBSD/mac68k also changes device switch tables.
>> But this driver chages tables directly by using memcpy() with hard-coded
>> device majors, not using this LKM feature. There is no good
>> solutions for this.
>> If want to attach the device switches to the kernel, we should use the
>> LM_DT_BLOCK/LM_DT_CHAR feature and free from hard-coded device majors.
>
>1) Ask Scott if we still need this lkm. I believe it predates our having
>an iwm driver in-tree.

No. It came with the driver.

>2) change it to use dynamic numbers. :-)

If the author of said lkm may speak up here... The merit of the iwm driver
lkm lies primarily in the fact that it is the only example for a block
driver lkm in the tree.

It is hackish because the lkm 'framework' as designed by Terry Lambert does
not really support a driver with both character and block device interface.
Since the device majors are already allocated, the driver reuses them
instead of having a script create /dev device nodes during modload.

Unfortunately, as I had to learn the hard way, the value of a driver lkm as
a development aid is nearly zero as long as there is no symbol loading
support for lkms.

	hauke


--
/~\  The ASCII Ribbon Campaign       "They that can give up essential liberty
\ /    No HTML/RTF in email          to obtain a little temporary safety
 X     No Word docs in email         deserve neither liberty nor safety."
/ \  Respect for open standards                    -- Benjamin Franklin, 1759