[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
detecting AIT compression
- To: tech_(_at_)_openbsd_(_dot_)_org
- Subject: detecting AIT compression
- From: Hal Snyder <hal_(_at_)_vailsys_(_dot_)_com>
- Date: 25 Oct 2000 21:32:05 -0500
Here are a couple patches that let you query the compression settings
of an AIT tape drive. One is to the st.c driver allowing "unsafe"
ioctls; the other is for the layout of the Data Compression Control
Page (part of Mode Sense and Mode Select).
After rebuilding the kernel with modified st.c, rebooting, and
patching scsi_modes as indicated, the following is possible at the
command line:
# scsi -f /dev/enrst0 -m 0x0F
DCE: 1
DCC: 1
DDE: 1
RED: 0
Compression Algorithm: 3
Decompression Algorithm: 3
Which says:
data compression is enabled
tape drive has data compression capability
data decompression is enabled
check condition will not be reported on boundaries between
uncompressed and ALDC1 compressed data
compression and decompression algorithms are set to ALDC1
Patch 1 - apply from /usr/src/sys
===========
*** scsi/st.c.orig Wed Oct 25 21:22:37 2000
--- scsi/st.c Wed Oct 25 21:29:00 2000
***************
*** 1284,1290 ****
default:
if (STMODE(dev) == CTLMODE)
! error = scsi_do_safeioctl(st->sc_link, dev,
cmd, arg, flag, p);
else
error = ENOTTY;
--- 1284,1290 ----
default:
if (STMODE(dev) == CTLMODE)
! error = scsi_do_ioctl(st->sc_link, dev,
cmd, arg, flag, p);
else
error = ENOTTY;
===========
Patch 2. Apply from /usr/share.
===========
*** misc/scsi_modes.orig Wed Jun 28 12:13:45 2000
--- misc/scsi_modes Wed Oct 25 15:07:52 2000
***************
*** 234,239 ****
--- 234,255 ----
{Output Port 3 Volume} i1
}
+ # Data Compression Control Page
+ 0x0F {
+ {DCE} t1
+ {DCC} t1
+ {Reserved} *t6
+ {DDE} t1
+ {RED} t2
+ {Reserved} *t5
+ {Compression Algorithm} i4
+ {Decompression Algorithm} i4
+ {Reserved} *i1
+ {Reserved} *i1
+ {Reserved} *i1
+ {Reserved} *i1
+ }
+
0x10 {
{Reserved} *t1
{Change Active Partition} t1
===========
Visit your host, monkey.org