diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-11-13 03:27:43 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-11-13 03:27:43 +0000 |
commit | afd062b7b153ae05c36a62b3b6fb7e6bd7953bb1 (patch) | |
tree | dbd64cade49e8e99487d358dad324ba6758fb14f /sys/scsi | |
parent | 1769ad36a1a2afc078d261b3d5becd1a22256870 (diff) |
Use SCSI_DELAY only once. Document it. Default to no delay.
Fixes two second system 'freeze' when umass device plugged in. Speeds
up boot by not waiting for a minimum of 2 seconds at each scsi bus.
ok jmc@ pedro@ deraadt@
Diffstat (limited to 'sys/scsi')
-rw-r--r-- | sys/scsi/scsi_base.c | 7 | ||||
-rw-r--r-- | sys/scsi/scsiconf.c | 11 |
2 files changed, 7 insertions, 11 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c index badb63d741a..570166d7ead 100644 --- a/sys/scsi/scsi_base.c +++ b/sys/scsi/scsi_base.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_base.c,v 1.95 2005/11/13 02:39:45 krw Exp $ */ +/* $OpenBSD: scsi_base.c,v 1.96 2005/11/13 03:27:42 krw Exp $ */ /* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */ /* @@ -79,6 +79,11 @@ scsi_init() return; scsi_init_done = 1; +#if defined(SCSI_DELAY) && SCSI_DELAY > 0 + /* Historical. Older buses may need a moment to stabilize. */ + delay(1000000 * SCSI_DELAY); +#endif + /* Initialize the scsi_xfer pool. */ pool_init(&scsi_xfer_pool, sizeof(struct scsi_xfer), 0, 0, 0, "scxspl", NULL); diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c index 38a3e56449a..f53c7d92b28 100644 --- a/sys/scsi/scsiconf.c +++ b/sys/scsi/scsiconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.c,v 1.97 2005/10/10 20:06:12 krw Exp $ */ +/* $OpenBSD: scsiconf.c,v 1.98 2005/11/13 03:27:42 krw Exp $ */ /* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */ /* @@ -179,15 +179,6 @@ scsibusattach(parent, self, aux) bzero(sb->sc_link[i], nbytes); } -#if defined(SCSI_DELAY) && SCSI_DELAY > 2 - printf("%s: waiting for scsi devices to settle\n", - sb->sc_dev.dv_xname); -#else /* SCSI_DELAY > 2 */ -#undef SCSI_DELAY -#define SCSI_DELAY 2 -#endif /* SCSI_DELAY */ - delay(1000000 * SCSI_DELAY); - scsi_probe_bus(sb->sc_dev.dv_unit, -1, -1); } |