/* <mt2def.h>
 *
 *	Extended magtape characteristics bits
 */
#ifndef _MT2DEF_H
#define _MT2DEF_H

#define MT2$V_SUP_DENS	  0
#define MT2$M_SUP_DENS	  0x0000FFFF
#define MT2$S_SUP_DENS	  16
#define MT2$V_WBC_ENABLE  16
#define MT2$V_RDC_DISABLE 17
#define MT2$V_CACHED_DATA 18
#define MT2$V_CD_LOST	  19
#define MT2$V_TAPE_MARK   20
#define MT2$V_COMP_SUP	  21
#define MT2$V_COMP_ENA	  22
#define MT2$M_WBC_ENABLE  (1<<MT2$V_WBC_ENABLE) /* 0x010000 */
#define MT2$M_RDC_DISABLE (1<<MT2$V_RDC_DISABLE) /* 0x020000 */
#define MT2$M_CACHED_DATA (1<<MT2$V_CACHED_DATA) /* 0x040000 */
#define MT2$M_CD_LOST	  (1<<MT2$V_CD_LOST)	/* 0x080000 */
#define MT2$M_TAPE_MARK   (1<<MT2$V_TAPE_MARK)	/* 0x100000 */
#define MT2$M_COMP_SUP	  (1<<MT2$V_COMP_SUP)	/* 0x200000 */
#define MT2$M_COMP_ENA	  (1<<MT2$V_COMP_ENA)	/* 0x400000 */
union mt2def {
    struct {
	unsigned mt2$v_sup_dens   : 16; /* supported densities */
	unsigned mt2$v_wbc_enable  : 1; /* write-back caching is enabled */
	unsigned mt2$v_rdc_disable : 1; /* read caching is disabled */
	unsigned mt2$v_cached_data : 1; /* class driver detected data in cache */
	unsigned mt2$v_cd_lost	   : 1; /* class driver detected cached data lost */
	unsigned mt2$v_tape_mark   : 1; /* tape mark has been written */
	unsigned mt2$v_comp_sup    : 1; /* compaction supported */
	unsigned mt2$v_comp_ena    : 1; /* compaction enabled */
	unsigned		   : 1;
	unsigned		   : 8; /* padding */
    } mt2$r_mt2def_bits;
};

#endif	/*_MT2DEF_H*/
