From 01bc758b999cfea0037b2752fe4fe9db38e47b37 Mon Sep 17 00:00:00 2001 From: Thierry Deval Date: Thu, 29 Jan 2004 12:47:19 +0000 Subject: Avoid an annoying freeze during attach of live "scsibus" devices. looks ok deraadt@, mickey@, krw@ and art@(but I hate it) --- sys/scsi/scsiconf.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'sys/scsi/scsiconf.c') diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c index 8741aced99c..c847c365416 100644 --- a/sys/scsi/scsiconf.c +++ b/sys/scsi/scsiconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.c,v 1.81 2004/01/25 00:09:20 krw Exp $ */ +/* $OpenBSD: scsiconf.c,v 1.82 2004/01/29 12:47:18 tdeval Exp $ */ /* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */ /* @@ -47,10 +47,11 @@ * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 */ -#include #include #include #include +#include +#include #include #include @@ -192,7 +193,10 @@ scsibusattach(parent, self, aux) #undef SCSI_DELAY #define SCSI_DELAY 2 #endif /* SCSI_DELAY */ - delay(1000000 * SCSI_DELAY); + if (cold) + delay(1000000 * SCSI_DELAY); + else + tsleep(sb, curproc->p_priority, NULL, SCSI_DELAY * hz); scsi_probe_bus(sb->sc_dev.dv_unit, -1, -1); } -- cgit v1.2.3