2 * drivers/s390/char/tape_3590.h
3 * tape device discipline for 3590 tapes.
5 * Copyright (C) IBM Corp. 2001,2006
6 * Author(s): Stefan Bader <shbader@de.ibm.com>
7 * Michael Holzheu <holzheu@de.ibm.com>
8 * Martin Schwidefsky <schwidefsky@de.ibm.com>
14 #define MEDIUM_SENSE 0xc2
15 #define READ_PREVIOUS 0x0a
16 #define MODE_SENSE 0xcf
17 #define PERFORM_SS_FUNC 0x77
18 #define READ_SS_DATA 0x3e
20 #define PREP_RD_SS_DATA 0x18
23 #define SENSE_BRA_PER 0
24 #define SENSE_BRA_CONT 1
25 #define SENSE_BRA_RE 2
26 #define SENSE_BRA_DRE 3
28 #define SENSE_FMT_LIBRARY 0x23
29 #define SENSE_FMT_UNSOLICITED 0x40
30 #define SENSE_FMT_COMMAND_REJ 0x41
31 #define SENSE_FMT_COMMAND_EXEC0 0x50
32 #define SENSE_FMT_COMMAND_EXEC1 0x51
33 #define SENSE_FMT_EVENT0 0x60
34 #define SENSE_FMT_EVENT1 0x61
35 #define SENSE_FMT_MIM 0x70
36 #define SENSE_FMT_SIM 0x71
38 #define MSENSE_UNASSOCIATED 0x00
39 #define MSENSE_ASSOCIATED_MOUNT 0x01
40 #define MSENSE_ASSOCIATED_UMOUNT 0x02
42 #define TAPE_3590_MAX_MSG 0xb0
46 struct tape_3590_disc_data {
47 unsigned char modeset_byte;
51 struct tape_3590_sense {
53 unsigned int command_rej:1;
54 unsigned int interv_req:1;
55 unsigned int bus_out_check:1;
56 unsigned int eq_check:1;
57 unsigned int data_check:1;
58 unsigned int overrun:1;
59 unsigned int def_unit_check:1;
60 unsigned int assgnd_elsew:1;
62 unsigned int locate_fail:1;
63 unsigned int inst_online:1;
64 unsigned int reserved:1;
65 unsigned int blk_seq_err:1;
66 unsigned int begin_part:1;
67 unsigned int wr_mode:1;
68 unsigned int wr_prot:1;
69 unsigned int not_cap:1;
73 unsigned int vlf_active:1;
75 unsigned int med_pos:1;
79 unsigned int rc_rqc:16;
83 unsigned int sense_fmt:8;
90 unsigned int reserved:6;
92 unsigned int refcode:8;
95 unsigned char volid[6];
102 unsigned int reserved1:5;
105 unsigned int simid:8;
107 unsigned int refcode1:16;
108 unsigned int refcode2:16;
109 unsigned int refcode3:16;
110 unsigned int reserved2:8;
112 unsigned char data[14];
114 unsigned char pad[10];
116 } __attribute__ ((packed));
118 struct tape_3590_med_sense {
119 unsigned int macst:4;
120 unsigned int masst:4;
122 } __attribute__ ((packed));
124 #endif /* _TAPE_3590_H */