From owner-freebsd-bugs Mon Jul 12 17:34:15 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from feral.com (feral.com [192.67.166.1]) by hub.freebsd.org (Postfix) with ESMTP id CE6CE15034 for ; Mon, 12 Jul 1999 17:34:03 -0700 (PDT) (envelope-from mjacob@feral.com) Received: from semuta.feral.com (semuta [192.67.166.70]) by feral.com (8.8.7/8.8.7) with ESMTP id RAA03312; Mon, 12 Jul 1999 17:33:55 -0700 Date: Mon, 12 Jul 1999 17:33:51 -0700 (PDT) From: Matthew Jacob Reply-To: mjacob@feral.com To: Juergen Lock Cc: freebsd-bugs@FreeBSD.ORG Subject: Re: kern/11945: tape problems on -stable, mt bl(ocksize), mt erase and hanging SCSI bus In-Reply-To: <199907130010.RAA87312@freefall.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Okay- I took the time to analyze this better. Sorry for the delay. This bug report mentions several items. > 1. mt bl(ocksize) stopped working, regardless what blocksize > i try i only get > > mt: /dev/nrsa0: blocksize: Invalid argument > > and on the console: > > Apr 27 16:00:47 saturn /kernel: (sa0:ncr0:0:5:0): MODE SELECT(06). >CDB: 15 0 0 0 > c 0 > Apr 27 16:00:47 saturn /kernel: (sa0:ncr0:0:5:0): ILLEGAL REQUEST >asc:26,0 > Apr 27 16:00:47 saturn /kernel: (sa0:ncr0:0:5:0): Invalid field in >parameter lis > t sks:8f,4 Clearly this works for me and others in a variety contexts. The key point here is to try and figure out why this particular tape drive/tape doesn't like this- this is offset 4 of the parameters, and this is the mode data: 0x00 0x00 0x10 0x08 0x7f 0x00 0x00 0x00 0x00 0x00 0x02 0x00 So, this so called SCSI-2 device, sa0: Removable Sequential Access SCSI-2 device can't cope with the SCSI-2 density code that means "use the same density as was set before". This is around line 2520: if (params_to_set & SA_PARAM_DENSITY) { mode_blk->density = density; } else if (softc->scsi_rev > SCSI_REV_CCS) { mode_blk->density = SCSI_SAME_DENSITY; } else { mode_blk->density = softc->media_density; } try changing the code to: if (params_to_set & SA_PARAM_DENSITY) { mode_blk->density = density; } else { mode_blk->density = softc->media_density; } and see what happens. > > 2. mt erase fails similarly (I don't have the syslog right > now, sorry) Possibly due to the same cause. > > 3. depending on factors i haven't found out, trying to read > after a BLANK CHECK on some tapes ends up hanging the entire > SCSI bus, printing this on the console: > > ncr0: SCSI phase error fixup: CCB already dequeued (0xf07e1200) > > followed by several of > ncr0: timeout nccb=0xf0xxxxxx (skip) > > and > > vm_fault: pager read error, pid xxx (process) This sounds like a bug in the ncr driver to me. > > CAMDEBUG tells me on the tapes where it hangs it does > five LOAD UNLOAD commands (the first rewinds the tape) while > normally it does only one LOAD UNLOAD. I can send the full > CAMDEBUG output of the working case if that helps... This was an attempt to try and rerun commands that *can* be rerun if they fail. All of the commands that have a known tape position at the end of the command can do this, but perhaps should not. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message