From owner-freebsd-hackers Fri May 9 12:52:22 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id MAA25479 for hackers-outgoing; Fri, 9 May 1997 12:52:22 -0700 (PDT) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id MAA25472 for ; Fri, 9 May 1997 12:52:19 -0700 (PDT) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id VAA07567; Fri, 9 May 1997 21:52:12 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.8.5/8.8.5) id VAA06002; Fri, 9 May 1997 21:29:32 +0200 (MET DST) Message-ID: <19970509212932.LH50829@uriah.heep.sax.de> 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 References: <199705090255.TAA00367@bubba.whistle.com> X-Mailer: Mutt 0.60_p2-3,5,8-9 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199705090255.TAA00367@bubba.whistle.com>; from Archie Cobbs on May 8, 1997 19:55:07 -0700 Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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. ;-)