From f42b75705cee14f2b28c309ad80c9f9924d0771b Mon Sep 17 00:00:00 2001 From: Alexander Yurchenko Date: Mon, 30 Dec 2002 21:50:30 +0000 Subject: Add new parameter to scsi_test_unit_ready(): retries number. Use increased retries number and don't ignore SCSI_IGNORE_NOT_READY when call scsi_test_unit_ready() for cd-rom, this makes system wait if drive is loading media. Tested by millert@ and fgsch@; some input and ok from krw@. Problem reported by The lord of the CD-writers Igor Grabin . --- sys/scsi/sd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/scsi/sd.c') diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index 1c30de210f1..bfbb1e7dec8 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.55 2002/09/04 23:07:28 tdeval Exp $ */ +/* $OpenBSD: sd.c,v 1.56 2002/12/30 21:50:29 grange Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -390,6 +390,7 @@ sdopen(dev, flag, fmt, p) } else { /* Check that it is still responding and ok. */ error = scsi_test_unit_ready(sc_link, + TEST_READY_RETRIES_DEFAULT, SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_MEDIA_CHANGE | SCSI_IGNORE_NOT_READY); -- cgit v1.2.3