Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 May 1996 13:14:19 +0200 (MET DST)
From:      Wilko Bulte <wilko@yedi.iaf.nl>
To:        joerg_wunsch@uriah.heep.sax.de
Cc:        freebsd-scsi@FreeBSD.ORG, fredriks@mcs.com
Subject:   Re: kern/1245: scsi tape driver write-protect and eject handling is broken
Message-ID:  <199605261114.NAA09075@yedi.iaf.nl>
In-Reply-To: <199605252106.XAA27362@uriah.heep.sax.de> from "J Wunsch" at May 25, 96 11:06:37 pm

next in thread | previous in thread | raw e-mail | index | archive | help
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
--------------------------------------------------------------------------------



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605261114.NAA09075>