Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Feb 2007 21:43:30 +1100
From:      Timothy Bourke <timbob@bigpond.com>
To:        drivers@freebsd.org
Subject:   vkbd driver and devfs
Message-ID:  <20070225104330.GA1696@triptrop>

next in thread | raw e-mail | index | archive | help

--KsGdsel6WgEHnImy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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=20
  =20
   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=20
        /dev/vkbd0
       =20
   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().
  =20
   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?
  =20
   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 behavi=
our?
  =20
   If not, possible fix: vkbd_dev_clone() should work upward from 0 looking
                         for unopen /dev/vkbdctl0 nodes before calling
                         clone_create().
=20
If necessary I will try to write a patch.

Tim.


--KsGdsel6WgEHnImy
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (FreeBSD)

iD8DBQFF4WhStKVK1sFb0ecRAuz0AJ4vlIhvbdzW5EfkfJCDCP0yLxmmRwCeKUnJ
n7FtygX9uomHOqF1bb/lrTs=
=1uEV
-----END PGP SIGNATURE-----

--KsGdsel6WgEHnImy--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070225104330.GA1696>