From owner-freebsd-hackers Tue Jun 13 05:08:01 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id FAA27994 for hackers-outgoing; Tue, 13 Jun 1995 05:08:01 -0700 Received: from hda.com (hda.com [199.232.40.182]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id FAA27977 for ; Tue, 13 Jun 1995 05:07:58 -0700 Received: (dufault@localhost) by hda.com (8.6.11/8.3) id IAA04194; Tue, 13 Jun 1995 08:07:02 -0400 From: Peter Dufault Message-Id: <199506131207.IAA04194@hda.com> Subject: Re: `device' versus `disk' in kernel config file To: freebsd-hackers@freebsd.org Date: Tue, 13 Jun 1995 08:07:02 -0400 (EDT) In-Reply-To: <199506130411.GAA06418@uriah.heep.sax.de> from "J Wunsch" at Jun 13, 95 06:11:11 am X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 2269 Sender: hackers-owner@freebsd.org Precedence: bulk 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