Subject: Re: interleaved disk probing output
To: Frank van der Linden <fvdl@NetBSD.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 10/10/2003 19:04:28
On Fri, Oct 10, 2003 at 06:21:08PM +0200, Frank van der Linden wrote:
> Since both the ATA and SCSI device proving now is done from threads
> after enabling interrupt, the output gets messed up sometimes.
> 
> I.e:
> 
> wd0 at atabus0 drive 0sd1 at scsibus0 target 5 lun 0: <SEAGATE, ST336607LC, 0006
> > disk fixed
> : <ST340015A>
> 
> That needs to be fixed.. should there be a config output lock for these
> situations?

There are ad-hoc locks in scsipi and ata to handle this, but they don't play
well from one bus to another (I think the same problem can also occur with USB
for example).
I was thinking about adding an ordering facility in the config framework.
When these busses are probed, they would either be declared as needing
ordering, or register themselves to the ordering facility, and then
could call a function that would make them tsleep() wait for their turn before
calling config_* for childs.

--
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 24 ans d'experience feront toujours la difference
--