[8] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

Getting recovered error count from tape drive

daemon@ATHENA.MIT.EDU (na8520d00-Nichols)
Wed Jan 11 17:43:24 1995

Date: Wed, 11 Jan 95 14:58:31 CST
From: rnichols@ih4ehw.ih.att.com (na8520d00-Nichols)
To: linux-scsi@vger.rutgers.edu

I've been examining the code in drivers/scsi/st.c trying to find a way
to access the recovered error count from my Archive 2150S (SCSI-1)
tape drive.  The current code does not maintain this count properly or
allow access to it:

 -  The code for scsi_done() in scsi.c does not appear to pass a
    recovered error from a tape drive back to the st driver.
    check_sense() translates RECOVERED_ERROR into SUGGEST_IS_OK, which
    is ignored in scsi_done().  Thus st_chk_result() never increments
    'recover_count'.

 -  Even if recover_count were being maintained, there is no way to
    access its value since it is used only in a printk() call.

 -  The current mag tape IOCTL data structures do not seem to have
    an element suitable for returning this value.

For now, I'm just going to patch in a new IOCTL to return the tape
drive's own recovered error counter, which is returned in bytes 12 and
13 of the extended sense data returned by a REQUEST SENSE command, and
return EINVAL if the drive is not a SCSI-1 device.  I suspect that not
all SCSI-1 tape drives access their recovered error counter that way,
so that isn't really an adequate filter.  It's the best I can come up
with right now, though.  I'll probably reuse the existing 'mtpos'
structure to pass the value back.

Any suggestions?

--
Bob Nichols,  AT&T Bell Laboratories,  rnichols@ihlpm.ih.att.com

home help back first fref pref prev next nref lref last post