Date: Sun, 25 Feb 2007 14:44:29 +1100 From: Timothy Bourke <timbob@bigpond.com> To: freebsd-drivers@freebsd.org Subject: vkbd driver and devfs Message-ID: <20070225034429.GA1182@triptrop>
index | next in thread | raw e-mail
[-- Attachment #1 --]
I am writing some code (a driver) that exploits the vkbd driver and I have
some questions about the latter. The following notes apply to 6.2-RELEASE.
The vkbd driver seems to interact strangely with devfs, specifically:
1. The /dev/vkbdctl device never appears in directory listings (although
it is found dynamically).
kldload vkbd
ls /dev | grep vkbd
# nothing
Possible fix: add make_dev and destroy_dev calls to vkbd_modeevent().
2. Opening /dev/vkbdctl for the first time correctly creates two devices
(and redirects the open to the first):
/dev/vkbdctl0
/dev/vkbd0
Closing /dev/vkbdctl0 correctly removes the /dev/vkbd0 device but not the
/dev/vkbdctl0 device itself. Should it also be removed?
Possible fix: `unclone' (if possible) /dev/vkbdctl0 in vkbd_dev_close().
Maybe a /dev/vkbdctl<N> node should only be removed if no higher numbered
nodes are in use? Then, presumably, all unopened lower numbered vkbdctl<M>
nodes should also be removed?
Currently /dev/vkbctl<N> nodes are removed en masse via a call to
clone_cleanup() when the driver is unloaded.
3. Each new open on /dev/vkbdctl creates and returns new /dev/vkbdctl<N>
devices with progressively higher values of N. Is this the proper behaviour?
If not, possible fix: vkbd_dev_clone() should work upward from 0 looking
for unopen /dev/vkbdctl0 nodes before calling
clone_create().
Pointers to the documentation or source are most welcome. Perhaps I have
overlooked something obvious.
If necessary I will try to write a patch.
Tim.
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (FreeBSD)
iD8DBQFF4QYdtKVK1sFb0ecRAvHTAJ4kP1EblU2ur/WLNxhdhRMz9vz8VACdEM2j
jQyyyZNcL4Ichmr97NBdONc=
=MjIz
-----END PGP SIGNATURE-----
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070225034429.GA1182>
