Subject: Re: Request for review on scsipi changes
To: James Chacon <jchacon@genuity.net>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 09/17/2002 10:30:40
On Mon, 16 Sep 2002, James Chacon wrote:

> >Looks good to me.
> >Maybe there's a chance to make the 2s SCSI delay before probe global instead
> >of per-channel ? It's annoying when you have a lot of channels.
>
> Doesn't that work by sending a reset to the HBA and then waiting 2s? Anything
> sent to the HBA should be done in the appropriate bus's thread to avoid
> possible issues.

The point is it's silly to wait 2*n seconds for n busses on start, when
you really only need to wait 2 seconds. Especially if you have say ten
busses or so.

> >The problem is that we have to keep it for hot-plug SCSI adapters.
> >I think the mechanism you implemented can help, with a global flag
> >set in scsibusattach() and cleared at the first SCSI_DELAY.
>
> Thats also why I think leaving it as is inside the probe is the best thing.

I think the best way to do this is have a "I'm by myself" version (which
we'd use after boot), and a, "We're booting, do all of these busses at
once" version. All the latter is is changing:

	foreach i in scsibusses {
		reset bus i
		wait 2 seconds
		scan bus i
	}

into

	foreach i in scsibusses
		reset bus i
	wait 2 seconds
	foreach i in scsibusses
		scan bus i

Take care,

Bill