*BSD News Article 2895


Return to BSD News archive

Path: sserve!manuel!munnari.oz.au!hp9000.csc.cuhk.hk!uakari.primate.wisc.edu!caen!destroyer!uunet!mcsun!uknet!axion!micromuse!hilly!peter
From: peter@micromuse.co.uk (Peter Galbavy)
Newsgroups: comp.unix.bsd
Subject: Re: 386BSD 0.1 scsi tape problem
Message-ID: <peter.712680116@hilly>
Date: 1 Aug 92 14:41:56 GMT
References: <1992Jul28.033036.18989@raid.dell.com> <712469595.7791@eyrie.img.com.au>
Organization: MicroMuse Limited, London, England.
Lines: 77

athos@eyrie.img.com.au (David Burren) writes:

>In <1992Jul28.033036.18989@raid.dell.com> james@raid.dell.com (James Van Artsdalen) writes:

>>I am running 386BSD 0.1 on a Dell 433P with 16 MB of DRAM, using an
>>Adaptec 1542B with a 660 MB Micropolis SCSI disk and an HP 2 GB SCSI
>>DAT tape drive.  I am having trouble writing to the tape drive.

>>   changing root device to as0a
>>   as0: attached tgt 0 <MICROP 1588-15MB1036511 AS0C> winchester disk 
>>   as0: attached tgt 4 <HP HP35480A A> tape 
>>   as4a: controller error 0x12 writing fsbn 0-19
>>   scsi sense: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
>>   as4a: controller error 0x12 writing fsbn 20-39
>>   scsi sense: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 

>>... more controller errors and scsi sense lines...

>>Any guesses as to what's wrong?

>I was getting similar sense messages on all SCSI devices until I realised
>the 1540's BIOS wasn't enabled.  I haven't had a chance to look at the
>as driver yet, but I think it's possible it's relying on part of the
>board being initialised by the BIOS on boot.

>Your disk is apparently behaving, so this might not be your problem, but
>what the hell...

No... the problem is the as.c driver code does not "know" about variable
blocksize tape drives (such as the HP DAT above). A patch was posted a
while back, which I applied and all the errors went away... now, just let
me dig it up. Oh yes, here it is...


--- variable tape blocksize patch ---
From: scott@pita.cns.ucla.edu (Scott Burris)
Newsgroups: comp.unix.bsd
Subject: 386BSD 0.1: variable blocksize tape on SCSI bugfix
Message-ID: <1992Jul27.130522.11907@mic.ucla.edu>
Date: 27 Jul 92 20:05:21 GMT
Reply-To: scott@pita.cns.ucla.edu (Scott Burris)
Organization: UCLA Campus Network Services

The SCSI driver is broken for variable length tape devices.  The problem
is that the data transfer length is computed by code which assumes a fixed
block tape drive.  This causes the computer to transfer less data than
the SCSI transaction calls for, which hangs the SCSI bus.  Context
diff's follow.  


*** as.c	Sun Jul 19 08:15:02 1992
--- as.c.orig	Sat Jul 18 20:10:32 1992
***************
*** 899,906 ****
  	n = 0;
  	sp = as->scatter_list;
  	nscatter = 0;
- 	if (as->tape && as->bs == 1)
- 		total = bp->b_bcount;
  	while (n < total && nscatter < NSCATTER) {
  		thistime = page_size - ((vm_offset_t)p - trunc_page (p));
  
--- 889,894 ----
--
----------
Scott Burris
UCLA Campus Network Services
cnetslb@oac.ucla.edu (213) 206-4860 - OR - scott@pita.cns.ucla.edu

--- end ---

Have fun now,

-- 
Peter Galbavy
Tech Support, Micromuse Ltd
Phone: +44 71 352 7774		E-Mail: P.Galbavy@micromuse.co.uk