From owner-freebsd-scsi Sun May 26 05:16:42 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id FAA22087 for freebsd-scsi-outgoing; Sun, 26 May 1996 05:16:42 -0700 (PDT) Received: from linux4nn.gn.iaf.nl (root@linux4nn.gn.iaf.nl [193.67.144.34]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id FAA22081 for ; Sun, 26 May 1996 05:16:34 -0700 (PDT) Received: from uni4nn.iaf.nl (root@uni4nn.iaf.nl [193.67.144.33]) by linux4nn.gn.iaf.nl (8.6.9/8.6.9) with SMTP id OAA02321; Sun, 26 May 1996 14:17:26 +0200 Received: by uni4nn.iaf.nl with UUCP id AA27321 (5.67b/IDA-1.5); Sun, 26 May 1996 14:16:23 +0200 Received: by iafnl.es.iaf.nl with UUCP id AA08759 (5.67b/IDA-1.5); Sun, 26 May 1996 13:41:31 +0200 Received: (from wilko@localhost) by yedi.iaf.nl (8.6.12/8.6.6) id NAA09075; Sun, 26 May 1996 13:14:19 +0200 From: Wilko Bulte Message-Id: <199605261114.NAA09075@yedi.iaf.nl> X-Organisation: Private FreeBSD site - Arnhem - The Netherlands Subject: Re: kern/1245: scsi tape driver write-protect and eject handling is broken To: joerg_wunsch@uriah.heep.sax.de Date: Sun, 26 May 1996 13:14:19 +0200 (MET DST) Cc: freebsd-scsi@FreeBSD.ORG, fredriks@mcs.com In-Reply-To: <199605252106.XAA27362@uriah.heep.sax.de> from "J Wunsch" at May 25, 96 11:06:37 pm X-Mailer: ELM [version 2.4 PL23] Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk As J Wunsch wrote... > > (Moved to freebsd-scsi) > > As Lars Fredriksen wrote: > > that I hadn't submitted context diffs. If someone is willing to review > > these changes (Peter?), then I can submit them if that eases the load > > on people. > > > *************** > > *** 547,552 **** > > --- 547,556 ---- > > #define QIC_1320 0x12 > > #define DDS 0x13 > > #define DAT_1 0x13 > > + #define EXB_8200 0x14 > > + #define EXB_8500 0x15 > > + #define EXB_8200C 0x8c > > + #define EXB_8500C 0x90 > > #define QIC_3080 0x29 > > > ! #define SCSI_2_MAX_DENSITY_CODE 0x17 /* maximum density code specified > > > ! #ifdef EXB_8500C > > ! # define SCSI_2_MAX_DENSITY_CODE EXB_8500C > > ! #else > > ! # define SCSI_2_MAX_DENSITY_CODE 0x17 /* maximum density code specified > > There are two things here that are questionable. I don't particularly > like the #ifdef EXB_8500C -- either we do support it, so it should be > available all the time, or we don't. It is, I'm sorry to say, a bad idea to have this #ifdef. I for myself own a DLT2000 drive that needs density codes $80/$81 to toggle compression mode on/off. We really don't need drive specific values all over the st.c > But the other thing (and that's why the freebsd-scsi) is that it > wasn't clear that the entire conception of ``MAX_DENSITY_CODE'' seems > to make sense. What are the pros and cons? Why is it there? Is it > only ``legacy code''? I killed the check in st.c in my tapedriver and let the drive decide whether it likes the code it received or not. If not, it will return an error. Sounds simple and adequate to me. When it comes to density codes, we should also take a look at mt Something like the following: - mt should have a way to find out if a tape is SCSI or not (ioctl that works on SCSI dev but not on other tapes ?) - mt should have a way to get inquiry string from the tape - mt should have a 'tapecap' file to know what is valid for a particular drive, compression and all. It can now also display the density settings that are non-SCSI-2 standard in an ASCII strings iso in hex. But: this is probably gross overkill. As long as the driver does not make any artificial checks. > cheers, J"org > > joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE _ __________________________________________________________________________ | / o / / _ Wilko Bulte email: wilko@yedi.iaf.nl |/|/ / / /( (_) Private FreeBSD site - Arnhem - The Netherlands --------------------------------------------------------------------------------