Date: Fri, 9 May 1997 21:29:32 +0200 From: j@uriah.heep.sax.de (J Wunsch) To: freebsd-hackers@FreeBSD.ORG Cc: archie@whistle.com (Archie Cobbs) Subject: Re: WORM drive under 2.2 Message-ID: <19970509212932.LH50829@uriah.heep.sax.de> In-Reply-To: <199705090255.TAA00367@bubba.whistle.com>; from Archie Cobbs on May 8, 1997 19:55:07 -0700 References: <199705090255.TAA00367@bubba.whistle.com>
next in thread | previous in thread | raw e-mail | index | archive | help
As Archie Cobbs wrote:
> but this fails...
>
> $ wormcontrol select HP 4020i
> wormcontrol: open(/dev/rworm0): Device not configured
Unload and reload the medium.
Or, apply the following (still experimental) patch:
Index: sys/scsi/worm.c
===================================================================
RCS file: /home/cvs/src/sys/scsi/worm.c,v
retrieving revision 1.36
diff -u -u -r1.36 worm.c
--- worm.c 1997/04/04 22:12:55 1.36
+++ worm.c 1997/05/04 16:12:33
@@ -504,12 +504,20 @@
}
/*
+ * Start the drive now. Some newer drives (HP 6020i, Philips
+ * CDD2660) report being NOT READY once they have been stopped.
+ */
+ if ((flags & O_NONBLOCK) == 0)
+ scsi_start_unit(sc_link, SCSI_SILENT);
+
+ /*
* Next time actually take notice of error returns,
* unit attn errors are now errors.
*/
sc_link->flags |= SDEV_OPEN;
- if (scsi_test_unit_ready(sc_link, SCSI_SILENT) != 0) {
+ if ((flags & O_NONBLOCK) == 0 &&
+ scsi_test_unit_ready(sc_link, SCSI_SILENT) != 0) {
SC_DEBUG(sc_link, SDEV_DB3, ("not ready\n"));
if ((flags & FWRITE) != 0)
worm->worm_flags &= ~WORMFL_TRACK_PREPED;
@@ -518,7 +526,6 @@
}
if ((flags & O_NONBLOCK) == 0) {
- scsi_start_unit(sc_link, SCSI_SILENT);
scsi_prevent(sc_link, PR_PREVENT, SCSI_SILENT);
if((flags & FWRITE) != 0) {
--
cheers, J"org
joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970509212932.LH50829>
