Skip site navigation (1)Skip section navigation (2)
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>

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

--n8g4imXOkfNTN/H1
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
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.


--n8g4imXOkfNTN/H1
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQFF4QYdtKVK1sFb0ecRAvHTAJ4kP1EblU2ur/WLNxhdhRMz9vz8VACdEM2j
jQyyyZNcL4Ichmr97NBdONc=
=MjIz
-----END PGP SIGNATURE-----

--n8g4imXOkfNTN/H1--



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