*BSD News Article 14042


Return to BSD News archive

Newsgroups: comp.os.386bsd.bugs
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!think.com!cass.ma02.bull.com!melb.bull.oz.au!sjg
From: sjg@melb.bull.oz.au (Simon J Gerraty)
Subject: New scsi system: write to tape problem.
Message-ID: <1993Apr5.155907.13833@melb.bull.oz.au>
Organization: Bull HN Information Systems Australia
Date: Mon, 5 Apr 1993 15:59:07 GMT
Lines: 49

I know I've raised this before... but someone must have seen this problem:
486DX-33,16Mb,386bsd-0.1 + patchkit-0.2.2 (using Julians SCSI drivers).

Trying to save more than ~20Mb to my tape (60Mb archive on 1542b), fails every time with the following errors:

Mar 23 09:24:27 zen /386bsd: st0: soft error(corrected) 
Mar 23 09:24:27 zen /386bsd: st0:error ignored

This appears to happen when ever the tape has to change
direction.

st_interpret_sense() is seeing sense->error_class == 7 and
sense->ext.extended.sense_key == 0x1 

this produces the st0: soft error(corrected) message.

st_done() then notices that we didn't have a real error (the
only cases it really expects here are reading a FILEMARK or EOM,
no mention of write problems).

st_done clears all the error bits and sets bp->b_resid =
bp->b_bcount which causes physio() to notice a 0 byte read/write
and return an error causing dump,cpio etc etc to give up.

Modifying st_done to only set bp->b_resid if reading allowed the
rest of the tape to be written, but there were two 8192 byte
hunks missing (xs->resid == bp->b_bcount suggesting no data was
written?).  The above error messages are output twice when
writing 42Mb to tape.

Modifying physio() to force a single retry when amtdone == 0,
again allowed the rest of the tape to be written, but seems the
wrong way to attack the problem (but I can't see how to force a
retry from within the driver...)

Also when I read the tape back I ended up 2k short!!!

I'm rather out of ideas at this stage - and as far as I can see
no one else is having a problem?  I can restore ok from my old
(sun386) backups, but I'd really like to be able to do a fresh
backup :-)

There seems to be a definite bug here, but I don't know enough
about SCSI internals to nail it.  Any assistance appreciated (as
always :-)
-- 
Simon J. Gerraty        <sjg@zen.void.oz.au>            (home)

#include <disclaimer>   /* imagine something *very* witty here */