From owner-freebsd-scsi Wed Jul 17 04:20:13 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id EAA01252 for freebsd-scsi-outgoing; Wed, 17 Jul 1996 04:20:13 -0700 (PDT) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id EAA01234 for ; Wed, 17 Jul 1996 04:20:04 -0700 (PDT) Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id NAA06722; Wed, 17 Jul 1996 13:12:20 +0200 Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id NAA02035; Wed, 17 Jul 1996 13:12:20 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.7.5/8.6.9) id NAA03732; Wed, 17 Jul 1996 13:06:32 +0200 (MET DST) From: J Wunsch Message-Id: <199607171106.NAA03732@uriah.heep.sax.de> Subject: Re: tandberg scsi tape + FreeBSD 2.1/2.0.5 To: freebsd-scsi@freebsd.org Date: Wed, 17 Jul 1996 13:06:32 +0200 (MET DST) Cc: jbh@labyrinth.net.au (John Hartley) Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199607160641.QAA13198@minotaur.labyrinth.net.au> from John Hartley at "Jul 16, 96 04:41:25 pm" X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk As John Hartley wrote: > >>> Output <<< > > Present Mode: Density = 0x00 Blocksize = 1024 bytes > ---------available modes--------- > Mode 0: Density = 0x00 Blocksize variable > Mode 1: Density = QIC-320 Blocksize variable > Mode 2: Density = QIC-150 Blocksize variable > Mode 3: Density = QIC-120 Blocksize variable Ick. This is weird (and it cannot work this way). Neither this blocksize nor this density will be accepted by the drive. As long as you're getting this, all other attempts are in vaine. However, this looks as if the `rogue' code wouldn't work as expected. (Sorry, i cannot reproduce this, this code has been taken out meanwhile. The entire rogue handling has been moved out to scsiconf.c, that's what is #ifdef NEW_SCSICONF for you.) Something like mt -f /dev/st0ctl.0 blocksize 0 mt -f /dev/st0ctl.0 density 0x15 is the least that must work. Try experimenting with this. > >I wonder whether we should always use the following kludge: > > > >@@ -1530,7 +1530,9 @@ > > scsi_cmd.length = dat_len; > > dat.header.blk_desc_len = sizeof(struct blk_desc); > > dat.header.dev_spec |= SMH_DSP_BUFF_MODE_ON; > >- dat.blk_desc.density = st->density; > >+ dat.blk_desc.density = > >+ st->density? st->density: > >+ 0x7f /* use previous density */; > > if (st->flags & ST_FIXEDBLOCKS) { > > scsi_uto3b(st->blksiz, dat.blk_desc.blklen); > > } > > > > > > > > I didn't try this as the previous test failed!! Hmm, no, if you kill the rogue entry, the above _should_ work nevertheless. (As long as the rogue entry is there, it seems the kernel uses 1024 byte blocksize, but i remember that this wasn't the case before for your drive.) > I guess the question is is what is it that the FreeBSD drivers are doing > that is different from the dos ASPI and Windows NT tape driver??? The BSD driver should perhaps by default not even try to MODE SELECT the drive. That's what it is constantly getting wrong in your case. Look here: > Jul 16 17:09:38 qwiff /kernel: st0(ahc0:2:0): command: 15,0,0,0,c,0-[12 bytes] > Jul 16 17:09:38 qwiff /kernel: ------------------------------ > Jul 16 17:09:38 qwiff /kernel: 000: 00 00 10 08 00 00 00 00 00 00 04 00 > Jul 16 17:09:38 qwiff /kernel: ------------------------------ That's the interesting line. It should actually look: > Jul 16 17:09:38 qwiff /kernel: 000: 00 00 10 08 15 00 00 00 00 00 00 00 ^^ ^^ -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)