Date: Mon, 28 Oct 1996 22:06:46 -0800 (PST) From: Jake Hamby <jehamby@lightside.com> To: Poul-Henning Kamp <phk@critter.tfs.com> Cc: current@freebsd.org Subject: Re: test DEVFS! Message-ID: <Pine.BSF.3.95.961028214353.235B-100000@hamby1> In-Reply-To: <1361.846503843@critter.tfs.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Okay, on casual inspection, I've found three problems with DEVFS, and one observation: 1) Audio devices are not being created correctly. I have a Soundblaster 16, and the following lines in my kernel: controller snd0 device sb0 at isa? port 0x220 irq 5 drq 1 vector sbintr device sbxvi0 at isa? drq 5 device sbmidi0 at isa? port 0x330 device opl0 at isa? port 0x388 Here are the devices I now have in /dev (from MAKEDEV): lrwxr-xr-x 1 root wheel 6 Oct 28 21:28 /dev/audio -> audio0 crw-rw-rw- 1 root wheel 30, 4 Oct 24 03:08 /dev/audio0 lrwxr-xr-x 1 root wheel 4 Oct 28 21:28 /dev/dsp -> dsp0 crw-rw-rw- 1 root wheel 30, 3 Sep 26 21:57 /dev/dsp0 lrwxr-xr-x 1 root wheel 5 Oct 28 21:28 /dev/dspW -> dspW0 crw-rw-rw- 1 root wheel 30, 5 Sep 26 21:57 /dev/dspW0 crw-rw-rw- 1 root wheel 30, 2 Sep 26 21:57 /dev/midi0 lrwxr-xr-x 1 root wheel 6 Oct 28 21:28 /dev/mixer -> mixer0 crw-rw-rw- 1 root wheel 30, 0 Sep 26 21:57 /dev/mixer0 lrwxr-xr-x 1 root wheel 6 Oct 28 21:28 /dev/music -> music0 crw-rw-rw- 1 root wheel 30, 8 Sep 26 21:57 /dev/music0 lrwxr-xr-x 1 root wheel 4 Oct 28 21:28 /dev/pss -> pss0 crw-rw-rw- 1 root wheel 30, 9 Sep 26 21:57 /dev/pss0 lrwxr-xr-x 1 root wheel 10 Oct 28 21:28 /dev/sequencer -> sequencer0 crw-rw-rw- 1 root wheel 30, 1 Sep 26 21:57 /dev/sequencer0 crw-rw-rw- 1 root wheel 30, 6 Sep 26 21:57 /dev/sndstat And here are the devices DEVFS creates: crw-rw---- 2 root games 30, 20 Oct 28 21:25 /mnt/dev/audio1 crw-rw---- 2 root games 30, 36 Oct 28 21:25 /mnt/dev/audio2 crw-rw---- 2 root games 30, 100 Oct 28 21:25 /mnt/dev/audio6 crw-rw---- 2 root games 30, 116 Oct 28 21:25 /mnt/dev/audio7 crw-rw---- 2 root games 30, 19 Oct 28 21:25 /mnt/dev/dsp1 crw-rw---- 2 root games 30, 35 Oct 28 21:25 /mnt/dev/dsp2 crw-rw---- 2 root games 30, 99 Oct 28 21:25 /mnt/dev/dsp6 crw-rw---- 2 root games 30, 115 Oct 28 21:25 /mnt/dev/dsp7 crw-rw---- 2 root games 30, 21 Oct 28 21:25 /mnt/dev/dspW1 crw-rw---- 2 root games 30, 37 Oct 28 21:25 /mnt/dev/dspW2 crw-rw---- 2 root games 30, 101 Oct 28 21:25 /mnt/dev/dspW6 crw-rw---- 2 root games 30, 117 Oct 28 21:25 /mnt/dev/dspW7 crw-rw---- 2 root games 30, 18 Oct 28 21:25 /mnt/dev/midi1 crw-rw---- 2 root games 30, 34 Oct 28 21:25 /mnt/dev/midi2 crw-rw---- 2 root games 30, 98 Oct 28 21:25 /mnt/dev/midi6 crw-rw---- 2 root games 30, 114 Oct 28 21:25 /mnt/dev/midi7 crw-rw---- 2 root games 30, 16 Oct 28 21:25 /mnt/dev/mixer1 crw-rw---- 2 root games 30, 32 Oct 28 21:25 /mnt/dev/mixer2 crw-rw---- 2 root games 30, 96 Oct 28 21:25 /mnt/dev/mixer6 crw-rw---- 2 root games 30, 112 Oct 28 21:25 /mnt/dev/mixer7 crw-rw---- 2 root games 30, 24 Oct 28 21:25 /mnt/dev/music1 crw-rw---- 2 root games 30, 40 Oct 28 21:25 /mnt/dev/music2 crw-rw---- 2 root games 30, 104 Oct 28 21:25 /mnt/dev/music6 crw-rw---- 2 root games 30, 120 Oct 28 21:25 /mnt/dev/music7 crw-rw---- 2 root games 30, 25 Oct 28 21:25 /mnt/dev/pss1 crw-rw---- 2 root games 30, 41 Oct 28 21:25 /mnt/dev/pss2 crw-rw---- 2 root games 30, 105 Oct 28 21:25 /mnt/dev/pss6 crw-rw---- 2 root games 30, 121 Oct 28 21:25 /mnt/dev/pss7 crw-rw---- 2 root games 30, 17 Oct 28 21:25 /mnt/dev/sequencer1 crw-rw---- 2 root games 30, 33 Oct 28 21:25 /mnt/dev/sequencer2 crw-rw---- 2 root games 30, 97 Oct 28 21:25 /mnt/dev/sequencer6 crw-rw---- 2 root games 30, 113 Oct 28 21:25 /mnt/dev/sequencer7 crw-rw---- 2 root games 30, 6 Oct 28 21:25 /mnt/dev/sndstat This is wrong in several ways! First, I only have one sound card, yet there are four sets of each type of node. Second, none of the minor device numbers are correct, and indeed if I cat an audio file to /mnt/dev/audio1 it prints "Device not configured" and the kernel complains "PCM device 1 not installed." Finally, there is no symlink from, e.g. /dev/audio to /dev/audio0. 2) There is no entry for /dev/sysmouse. This is a device, managed by syscons and moused, which allows both XFree86 and syscons to use the mouse. It should be: crw------- 1 root wheel 12, 128 Oct 28 21:29 /dev/sysmouse and /dev/mouse should be a symlink to /dev/sysmouse. 3) The disk devices are not being created, as you mentioned. However, I've noticed an interesting explanation for this. The disk device is only created AFTER you mount that device node! For example (/dev is a regular filesystem, DEVFS is mounted on /mnt/dev): # ls -l /mnt/dev/rsd2* /mnt/dev/sd2* crw-r----- 2 root operator 13, 0x00010012 Oct 28 21:25 /mnt/dev/rsd2 crw------- 2 root wheel 13, 0x20000010 Oct 28 21:25 /mnt/dev/rsd2.ctl brw-r----- 2 root operator 4, 0x00010012 Oct 28 21:25 /mnt/dev/sd2 # mount -o ro -t msdos /dev/sd2s4 /zip # ls -l /mnt/dev/rsd2* /mnt/dev/sd2* crw-r----- 2 root operator 13, 0x00010012 Oct 28 21:25 /mnt/dev/rsd2 crw------- 2 root wheel 13, 0x20000010 Oct 28 21:25 /mnt/dev/rsd2.ctl crw-r----- 2 root operator 13, 0x00050012 Oct 28 21:57 /mnt/dev/rsd2s4 brw-r----- 2 root operator 4, 0x00010012 Oct 28 21:25 /mnt/dev/sd2 brw-r----- 2 root operator 4, 0x00050012 Oct 28 21:57 /mnt/dev/sd2s4 Notice how the entries for /dev/sd2s4 showed up after I mounted it? Because of removable media (in this case, a Zip drive), it seems we need a "disks" utility (indeed, this is the name of the Solaris equivalent) to probe the SCSI chain and recreate the nodes if a disk has been added or removed. I hope you have already thought of this problem! 4) Finally, an observation. There are a few devices which are created by LKM's, for example joy_mod.o. These LKM's would need to be recompiled with -DDEVFS or else they won't work for a DEVFS system. I didn't test this theory extensively, however I tried loading joy_mod.o and the joy0 device of course did not show up in DEVFS. When I unloaded joy_mod.o, the kernel panicked! All things considered, DEVFS looks very promising. However, the issues I mentioned, at minimum, need to be handled before I will consider using it on my system. -- Jake On Mon, 28 Oct 1996, Poul-Henning Kamp wrote: > > Please start shaking out DEVFS now. I know that at least a disk-less > system will do the right thing if compiled with DEVFS_ROOT now. > > There are probably still some problems with getting all the disk-devices > created, but I belive Bruce is working on that. > > -- > Poul-Henning Kamp | phk@FreeBSD.ORG FreeBSD Core-team. > http://www.freebsd.org/~phk | phk@login.dknet.dk Private mailbox. > whois: [PHK] | phk@ref.tfs.com TRW Financial Systems, Inc. > Future will arrive by its own means, progress not so. > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.961028214353.235B-100000>