Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 May 1995 06:14:18 -0400 (EDT)
From:      Peter Dufault <dufault@hda.com>
To:        imb@scgt.oz.au
Cc:        hackers@FreeBSD.org
Subject:   Re: SCSI drive auto error reallocation
Message-ID:  <199505071014.GAA17539@hda.com>
In-Reply-To: <199505070937.TAA28473@asstdc.scgt.oz.au> from "michael butler" at May 7, 95 07:37:44 pm

next in thread | previous in thread | raw e-mail | index | archive | help
(I'm moving the discussion to -hackers.  The announcement of the
new software is pertinent to -current, but the technical discussion
probably should go on in -hackers).

michael butler writes:

> 
> > The newest version of "scsi" lets you edit your mode pages.  Now that I've
> > added that you may want to check to see if you have automatic read and
> > write reallocation enabled.  I have three SCSI drives and none did.
> 
> Nor did mine .. however, I can understand wishing to dynamically reallocate
> on write failures, but reads ?

The drive will only do the reallocation if it can successfully recover
the data.

>  
> > The command is "scsi -f /dev/rsd?c -m 1" to dump mode page 1 ..
> 
> On an ISA machine (running -current, 7/7/95, BusLogic 542B, OLD firmware)
> this can cause ..
> 
> May  7 17:46:50 asstdc /kernel: aha0: DMA beyond end Of ISA 
> May  7 17:46:50 asstdc /kernel: biodone: buffer already done
> 
>  .. needless to say the ioctl fails. Not fatal, but interesting.

BUG: The user mode ioctl doesn't use bounce buffers.  Do you have
more than 16 MB of memory?  How did you manage to do the ioctl?

I assume I just have to add 
>    /* 
>     * Use a bounce buffer if necessary
>     */
>#ifdef BOUNCE_BUFFERS
>    if (sc_link->flags & SDEV_BOUNCE)
>        vm_bounce_alloc(bp);
>#endif      

before the scsi_scsi_cmd in scsistrategy.

> > > hda# scsi -f /dev/rsd2c -m 1
> > > AWRE (Auto Write Reallocation Enbld):  1 
> > > ARRE (Auto Read Reallocation Enbld):  1 
> > > TB (Transfer Block):  1 
> > > RC (Read Continuous):  0 
> > > EER (Enable Early Recovery):  1 
> > > PER (Post Error):  0 
> > > DTE (Disable Transfer on Error):  0 
> > > DCR (Disable Correction):  0 
> > > Read Retry Count:  18 
> > > Correction Span:  11 
> > > Head Offset Count:  0 
> > > Data Strobe Offset Count:  0 
> > > Write Retry Count:  18 
> > > Recovery Time Limit:  0 
>  
> > If AWRE and ARRE are 0 you want to run the command with the "-e -P 3"
> > switches to permanently enable read and write reallocation.
> 
> Could someone please explain 'TB' and 'EER' which seem to differ from teh
> above on a drive here ?

You seem to be setup properly and this disk is setup improperly.

TB: "A transfer block (TB) bit of one indicates that a data block that is
not recovered within the recovery limits specified shall be transferred
to the initiator before CHECK CONDITION status is returned.  A TB bit of
zero indicates that such a data block shall not be transferred to the
initiator".

It is probably better to change this to 0, though the driver
should properly detect this as an error.

EER: "An enable early recovery bit of one indicates that the target
shall use the most expedient form of error recovery first.  An EER bit
of zero indicates that the target shall use an error recovery procedure
that minimizes the risk of mis-detection or mis-correction".

A note says "An EER bit of zero typically means that the specified retry
limit is exhausted prior to using error correction codes".

It is probably better to change this to 0 also.

PER means to report recovered errors and should be left at 0,
since I bet an error report would be interpreted as an error.

DTE of 1 indicates the target should terminate the data phase upon
detection of a recovered error.  It should be left at 0.

RC means return the right amount of data as fast as possible
regardless of whether or not it is correct, even if it needs to be fabricated.
Probably best left at 0.

-- 
Peter Dufault               Real Time Machine Control and Simulation
HD Associates, Inc.         Voice: 508 433 6936
dufault@hda.com             Fax:   508 433 5267



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199505071014.GAA17539>