diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2013-09-23 22:14:46 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2013-09-23 22:14:46 +0000 |
commit | d72728baab70f57e1f8b37d4fa167f5897be4e95 (patch) | |
tree | aaa1a58abc8c31483eac3edc55fce4642e3ed34d /sys | |
parent | f451ac953e8145d23895ee995f93cb866acb2842 (diff) |
Remove SLOWSCSI and the millisecond delay after each phase change it introduces.
This code was added back when the scsi code between the kernel and the boot
blocks was shared, to work around an obscure kernel problem (and definitely
not related to bootstrap, at all).
While there, increase the target selection timeout from 2ms to 250ms, to
match the value currently used by the kernel.
Crank boot blocks version. Booting a kernel from disk is now significantly
faster.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/hp300/stand/common/scsi.c | 25 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/version.c | 5 |
2 files changed, 8 insertions, 22 deletions
diff --git a/sys/arch/hp300/stand/common/scsi.c b/sys/arch/hp300/stand/common/scsi.c index 42bd5cc1ff8..bf283a46b4f 100644 --- a/sys/arch/hp300/stand/common/scsi.c +++ b/sys/arch/hp300/stand/common/scsi.c @@ -1,13 +1,7 @@ -/* $OpenBSD: scsi.c,v 1.9 2013/03/23 16:08:28 deraadt Exp $ */ +/* $OpenBSD: scsi.c,v 1.10 2013/09/23 22:14:44 miod Exp $ */ /* $NetBSD: scsi.c,v 1.7 1997/01/30 10:32:57 thorpej Exp $ */ /* - * This is reported to fix some odd failures when disklabeling - * SCSI disks in SYS_INST. - */ -#define SLOWSCSI - -/* * Copyright (c) 1988 University of Utah. * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -172,10 +166,10 @@ issue_select(volatile struct scsidevice *hd, u_char target, u_char our_addr) hd->scsi_pctl = 0; hd->scsi_temp = (1 << target) | our_addr; - /* select timeout is hardcoded to 2ms */ - hd->scsi_tch = 0; - hd->scsi_tcm = 32; - hd->scsi_tcl = 4; + /* select timeout is hardcoded to 250ms */ + hd->scsi_tch = 2; + hd->scsi_tcm = 113; + hd->scsi_tcl = 3; hd->scsi_scmd = SCMD_SELECT; return (0); @@ -330,15 +324,6 @@ scsiicmd(struct scsi_softc *hs, int target, u_char *cbuf, int clen, u_char *buf, (int)(hs - scsi_softc), phase); goto abort; } -#ifdef SLOWSCSI - /* - * XXX we have weird transient problems with booting from - * slow scsi disks on fast machines. I have never been - * able to pin the problem down, but a large delay here - * seems to always work. - */ - DELAY(1000); -#endif /* wait for last command to complete */ while ((ints = hd->scsi_ints) == 0) { if (--wait < 0) diff --git a/sys/arch/hp300/stand/common/version.c b/sys/arch/hp300/stand/common/version.c index c605023e867..e2a89de9929 100644 --- a/sys/arch/hp300/stand/common/version.c +++ b/sys/arch/hp300/stand/common/version.c @@ -1,4 +1,4 @@ -/* $OpenBSD: version.c,v 1.13 2013/02/02 13:34:29 miod Exp $ */ +/* $OpenBSD: version.c,v 1.14 2013/09/23 22:14:45 miod Exp $ */ /* * Record major changes in the boot code here, and increment the version @@ -25,6 +25,7 @@ * from the default boot device without an explicit device or a leading * `/'. * 2.14 Build with the ELF toolchain. + * 2.15 Remove SLOWSCSI from scsi code, and increase target selection timeout. */ -const char version[] = "2.14"; +const char version[] = "2.15"; |