Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Sep 1997 07:03:21 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        julian@whistle.com (Julian Elischer)
Cc:        current@FreeBSD.ORG
Subject:   Re: buf struct & scsi disk IO availability.
Message-ID:  <199709300703.AAA16827@usr01.primenet.com>
In-Reply-To: <343082D9.41C67EA6@whistle.com> from "Julian Elischer" at Sep 29, 97 09:40:57 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> I have hit a point on which I am not on firm ground..
> 
> I would like to do some IO from a disk at PROBE time.
> In my original SCSI code, this would have been ok, as long as
> I didn't need interrupts. I thought I should check the following
> points with thre readers of -current before I go further however..
> 
> 1/ is the buf system set up fully by this time, 
> i.e. can I user getebuf()?
> david? bruce? john?

Heh.  I wrote the original SYSINIT stuff and you checked it in, but
you have to ask???  8-).

SI_SUB_DRIVERS		= 0x23000000,	/* Let Drivers initialize */
SI_SUB_CONFIGURE	= 0x24000000,	/* Configure devices */
SI_SUB_VM_CONF		= 0x38000000,	/* config VM, set limits*/

This should mean "no".

Probably the "probe" and the "attach" need to be seperated.  Can you
live with attach time instead of probe time?  I think if the answer
is "no", an architectural change is required.

See /sys/sys/kernel.h and search for "SI_".

If this is for a "registry" type mechanism, a BIOS-based I/O is not
out of the question, I think.


> 2/ Jason, if I use the disk as a direct result of the scsi_attach()
> routine, does that catch you off guard in the aic driver?

I don't know this, but the attach should be much more ready than
the probe.

> In other words, when you call scsi_attach() and friends, 
> are you set up enough to handle that routine looping back and in turn
> asking you to perform IO (e.g. to read the fdisk table).
> 
> If this is not the case, I have a work-around which would be to queue
> further configuration to occur at some later time (but before
> mounting root), but it wouldn't be so clean.

This sounds most reasonable.  Windows does the same thing, and generates
certain "subsystem is read for use" initialization events which drivers
and other things can catch and then do incremental work using.  Despite
the source of the idea, it's a good idea, IMO.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



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