From owner-freebsd-hackers Fri Feb 17 16:08:28 1995 Return-Path: hackers-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id QAA27478 for hackers-outgoing; Fri, 17 Feb 1995 16:08:28 -0800 Received: from hda.com (hda.com [199.232.40.182]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id QAA27470 for ; Fri, 17 Feb 1995 16:08:25 -0800 Received: (dufault@localhost) by hda.com (8.6.9/8.3) id TAA25517; Fri, 17 Feb 1995 19:06:53 -0500 From: Peter Dufault Message-Id: <199502180006.TAA25517@hda.com> Subject: Re: SCSI and config(8): Done. To: julian@tfs.com (Julian Elischer) Date: Fri, 17 Feb 1995 19:06:52 -0500 (EST) Cc: freebsd-hackers@freefall.cdrom.com In-Reply-To: from "Julian Elischer" at Feb 17, 95 03:13:43 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 2783 Sender: hackers-owner@FreeBSD.org Precedence: bulk Julian Elischer writes: > > > > > I've added support to configure the SCSI system using config(8). > > I'm going to wait for the "slice" code to settle before committing. > > this looks good, and I was wondering how to get this information > to the system.. There is the question however of: if a device > doesn't match what's there, how do we find out, and what do we do? > should we have a call in each driver that confirms that it can > handle what it sees? If it doesn't match it is skipped. For example, if we expect a tape at bus 0 target 1 lun 0 and we find a disk, the tape is skipped and the disk is matched following the rules - given that I've locked out mismatches in the config, it will autocount and become the next available disk. > What do we do it it DOESN't match.... how > can we force a device that reports itself as type B (eroneously) > to be handled by the driver for type C (I have devices that report > as tape but should be type processor)... We handle that either via the flags or using scsi(3). Currently there is no way to do it except scsi(3), though I thought about adding a flag field - I think you could contrive a way to use "st" to access the "worm" device that Jordan has. > > > > Here is what I did. (...) > > for this to really work properly, we need to disable the autonumbering of > the adapters, so that if aha- dies, aha1 doesn't suddenly become aha0.. Well, no, because you can wire aha1 down also. If you don't wire anything down you get the exact behavior we currently have. > > > > > (I have to look at how the multiple SCSI bus adapters work - I > > suppose both busses have the same driver and adapter unit number, > > so this current scheme may not work: I may need driver, unit and > > bus in the scsi_cinit table.) > > controller scbus0 at ahx0 > controller scbus1 at ahx0 I thought more like "controller scbus0 at foo0 bus 0" > > I guess Every layer in the hierarchy needs some sort of 'subunit' > field... in isa it's port-address, > in scsi it's target, > in adapters it's unit#, similar to wd0 and wd1 > I guess it means adding a field to the structure.. > > We are slowely heading in the direction of NetBSD(& BSDI I think) > config, in which the softc structure is allocated by the > config routine, and every layer in the hierarchy > is defined the same way...... > (...) > > For new config files this becomes "use assignments when provided, > > then autocount beginning after the highest assigned number". > yes.... > now, what about devices that are turned off and probed later when turned on..? I think it still works fine. -- Peter Dufault Real Time Machine Control and Simulation HD Associates, Inc. Voice: 508 433 6936 dufault@hda.com Fax: 508 433 5267