Date: Fri, 1 Aug 1997 06:56:52 -0400 (EDT) From: Peter Dufault <dufault@hda.com> To: asami@cs.berkeley.edu (Satoshi Asami) Cc: scsi@freebsd.org Subject: Re: NOT READY Message-ID: <199708011056.GAA06673@hda.hda.com> In-Reply-To: <199708011106.EAA27735@silvia.HIP.Berkeley.EDU> from Satoshi Asami at "Aug 1, 97 04:06:17 am"
next in thread | previous in thread | raw e-mail | index | archive | help
> Something like this?
>
> ===
> Index: sd.c
> ===================================================================
> RCS file: /usr/cvs/src/sys/scsi/sd.c,v
> retrieving revision 1.95.2.2
> diff -u -r1.95.2.2 sd.c
> --- sd.c 1997/02/05 19:02:22 1.95.2.2
> +++ sd.c 1997/08/01 08:54:18
> @@ -853,6 +853,13 @@
> if (inqbuf->dev_qual2 & SID_REMOVABLE)
> return SCSIRET_CONTINUE;
>
> + /* Restart if drive says not ready.
> + */
> + if ((sense->error_code & SSD_ERRCODE_VALID) == 0x2) {
> + scsi_start_unit(sc_link, SCSI_ERR_OK | SCSI_SILENT);
> + return SCSIRET_CONTINUE;
> + }
> +
> /* Retry all disk errors.
> */
> scsi_sense_print(xs);
> ===
>
> (I haven't tried it yet...it's kinda scary. ;)
Something like that - I think you want to return SCSIRET_DO_RETRY and
not SCSIRET_CONTINUE, and you may need to delay in there somehow because
it is going to take a while to spin up.
Peter
--
Peter Dufault (dufault@hda.com) Realtime development, Machine control,
HD Associates, Inc. Safety critical systems, Agency approval
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708011056.GAA06673>
