Date: Tue, 13 Jun 1995 08:07:02 -0400 (EDT) From: Peter Dufault <dufault@hda.com> To: freebsd-hackers@freebsd.org Subject: Re: `device' versus `disk' in kernel config file Message-ID: <199506131207.IAA04194@hda.com> In-Reply-To: <199506130411.GAA06418@uriah.heep.sax.de> from "J Wunsch" at Jun 13, 95 06:11:11 am
next in thread | previous in thread | raw e-mail | index | archive | help
J Wunsch writes: > > As Bruce Evans wrote: > > > > >What exactly is the difference between saying: > > > > > device sd0 > > > device st0 > > > > >and > > > > > disk sd0 > > > tape st0 > > > > >in a kernel config file? > > > > The latter wouldn't work. In general, `disk's are attached to controllers > > and `devices's are stand-alone. `device sd0' would give little more than > > a file "sd.h" with `#define NSD 1" in it, except config/mkioconf.c knows > > that the devices cd, ch, sd, st and uk are scsi devices (:-() and generates > > extra code for them. > > Perhaps the rules should be generalized, and we should people require > to configure their scsi devices like: > > disk sd0 on scbus? > tape st0 on scbus? > > when referring to the `generic' devices? This would config allow to > forget about the extra knowledge to know all SCSI device by name. > > disk sd? on scbus? > > might be even better, but i guess it's beyond the current syntax. I think "disk sd? at scbus?" will do something reasonable. Here is one of my configs for SCSI and this seems to work fine: > controller aha0 at isa? port "IO_AHA0" bio irq 11 drq 5 vector ahaintr > controller aic0 at isa? port 0x340 bio irq 12 vector aicintr > > controller scbus0 at aha0 > controller scbus1 at aic0 > > disk sd0 at scbus0 target 0 > disk sd1 at scbus0 target 1 > disk sd2 at scbus0 target 3 > tape st1 at scbus0 target 6 > device cd0 at scbus0 target 2 > > device pt0 at scbus? > device sctarg0 at scbus? > device sctarg1 at scbus? > device worm0 at scbus? I was under the impression that "disk" is handled specially in order to generate potential mount and swap info, and then is treated like "device". I'm the guy who left "sd, cd, st, ..." special so that no one had to change their config files. Any new SCSI devices (worm, processor target, user written device, etc) have to use the "at scbus?" clause for the configuration to work properly. Note that you can now add a SCSI device without changing the config program since the "at scbus?" tells it what it needs to know. Peter -- Peter Dufault Real Time Machine Control and Simulation HD Associates, Inc. Voice: 508 433 6936 dufault@hda.com Fax: 508 433 5267
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199506131207.IAA04194>