Return to BSD News archive
Received: by minnie.vk1xwt.ampr.org with NNTP id AA1660 ; Tue, 23 Feb 93 14:52:23 EST Newsgroups: comp.os.386bsd.bugs,comp.unix.bsd Path: sserve!manuel.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!spool.mu.edu!uwm.edu!zaphod.mps.ohio-state.edu!menudo.uh.edu!uuneo!sugar!karl From: karl@NeoSoft.com (Karl Lehenbauer) Subject: SCSI tapedrive fixes Organization: NeoSoft Communications Services -- (713) 684-5900 Date: Thu, 18 Feb 1993 07:19:25 GMT Message-ID: <C2Mv0E.LMt@sugar.neosoft.com> Lines: 96 This is an unofficial patch. It is *not* part of the official unofficial patchkit allegedly maintained by Jordan Hubbard (jkh@whisker.lotus.ie) and previously by that wacky Nate Williams. If you apply this patch you need your own backout plan. Further you can expect with reasonable certainty that this patch or one like it will come out through the official unofficial patchkit. If you need it now and can't wait, though, use it. As always, we are not responsible for whatever this patch does or fails to do to your system. PATCH: SCSI TAPEDRIVE FIXES AUTHOR: James da Silva (jds@cs.umd.edu) et al DESCRIPTION: Here are some patches for SCSI tapes that have been floating around. They are absolutely essential for using DAT drives, plus they add other features like a no-rewind device. If you haven't applied Nathan's patch 601 then the offsets will be wrong when you apply the patch -- those 50x and 60x patches should have been in the normal sequence anyway since their capabilities are only enabled with "options" directives in any case. The SCSI driver as.c assumed fixed-block-size tapedrives. (Fix produced by Scott Burris) as.c didn't write file marks. The driver still doesn't write two filemarks for end-of-medium, but that is less important. as.c couldn't read multi-file tapes. It didn't have any no-rewind devices. The no-rewind devices have a minor number one greater than the base number for the target (eg same as partition b for disks). Here's what James did with a tape at target 2: # ln /dev/ras2a /dev/rst2 # mknod /dev/nrst2 c 13 17 Now I refer to the tape as "/dev/rst2" and "/dev/nrst2". The tape at SCSI target 4 doesn't work. The solution is that the devices for ras4[ad] in the distribution are wrong. The major numbers should be 13, not 11. Try: # rm /dev/ras4[ad] # mknod /dev/ras4a c 13 32 # mknod /dev/ras4d c 13 35 (but you don't really need the d partition for tapes) (this fix is from Bill Jolitz) *** /sys/i386/isa/as.c.pre-neosoft Thu Feb 18 00:05:14 1993 --- /sys/i386/isa/as.c Thu Feb 11 00:09:12 1993 *************** *** 437,447 **** } } - if (as->tape && dev_part(dev)) { - error = EIO; - goto done; - } - as->scsi_cdb_len = 10; bzero(cdb, 10); cdb[0] = 0x25; /* SCSI_READCAPACITY */ --- 437,442 ---- *************** *** 562,568 **** bp = geteblk (DEV_BSIZE); ! if (0 && (flag & FWRITE) != 0) { /* presume user will use tape again */ as->scsi_cdb_len = 6; cdb = as->scsi_cdb; --- 557,563 ---- bp = geteblk (DEV_BSIZE); ! if ((flag & FWRITE) != 0) { /* presume user will use tape again */ as->scsi_cdb_len = 6; cdb = as->scsi_cdb; *************** *** 897,902 **** --- 892,899 ---- 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)); -- -- Email info@NeoSoft.com for info on getting interactive Internet access. "I didn't have time to write a short letter, so I wrote a long one instead." -- Twain