diff options
author | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 2001-05-01 02:26:43 +0000 |
---|---|---|
committer | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 2001-05-01 02:26:43 +0000 |
commit | 5b483db050d796679281c84327dea6a74771e578 (patch) | |
tree | c301fed58425ae7c4c0b1fca72a051917636116a /sys/dev | |
parent | 29304d5f4095de24624e06f7e41f441e69251f07 (diff) |
Add a 250ms wait in attach if ATAPI drives present on channel. Some
ATAPI devices need a while to boot their firmware, esp. if there is a
CD in the drive. Sending them commands early causes them to wedge or
abort those commands.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/wdc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c index a6986078a1f..9980abc265e 100644 --- a/sys/dev/ic/wdc.c +++ b/sys/dev/ic/wdc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wdc.c,v 1.31 2001/04/30 21:17:41 csapuntz Exp $ */ +/* $OpenBSD: wdc.c,v 1.32 2001/05/01 02:26:42 csapuntz Exp $ */ /* $NetBSD: wdc.c,v 1.68 1999/06/23 19:00:17 bouyer Exp $ */ @@ -639,6 +639,12 @@ wdcattach(chp) return; } + /* ATAPI drives need settling time. Give them 250ms */ + if ((chp->ch_drive[0].drive_flags & DRIVE_ATAPI) || + (chp->ch_drive[1].drive_flags & DRIVE_ATAPI)) { + delay(250 * 1000); + } + #ifdef WDCDEBUG if (chp->wdc->sc_dev.dv_cfdata->cf_flags & WDC_OPTION_PROBE_VERBOSE) wdcdebug_mask |= DEBUG_PROBE; |