• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef _QIC117_H
20 #define _QIC117_H
21 typedef enum {
22  QIC_NO_COMMAND = 0,
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24  QIC_RESET = 1,
25  QIC_REPORT_NEXT_BIT = 2,
26  QIC_PAUSE = 3,
27  QIC_MICRO_STEP_PAUSE = 4,
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29  QIC_ALTERNATE_TIMEOUT = 5,
30  QIC_REPORT_DRIVE_STATUS = 6,
31  QIC_REPORT_ERROR_CODE = 7,
32  QIC_REPORT_DRIVE_CONFIGURATION = 8,
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34  QIC_REPORT_ROM_VERSION = 9,
35  QIC_LOGICAL_FORWARD = 10,
36  QIC_PHYSICAL_REVERSE = 11,
37  QIC_PHYSICAL_FORWARD = 12,
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39  QIC_SEEK_HEAD_TO_TRACK = 13,
40  QIC_SEEK_LOAD_POINT = 14,
41  QIC_ENTER_FORMAT_MODE = 15,
42  QIC_WRITE_REFERENCE_BURST = 16,
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44  QIC_ENTER_VERIFY_MODE = 17,
45  QIC_STOP_TAPE = 18,
46  QIC_MICRO_STEP_HEAD_UP = 21,
47  QIC_MICRO_STEP_HEAD_DOWN = 22,
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49  QIC_SOFT_SELECT = 23,
50  QIC_SOFT_DESELECT = 24,
51  QIC_SKIP_REVERSE = 25,
52  QIC_SKIP_FORWARD = 26,
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54  QIC_SELECT_RATE = 27,
55  QIC_ENTER_DIAGNOSTIC_1 = 28,
56  QIC_ENTER_DIAGNOSTIC_2 = 29,
57  QIC_ENTER_PRIMARY_MODE = 30,
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59  QIC_REPORT_VENDOR_ID = 32,
60  QIC_REPORT_TAPE_STATUS = 33,
61  QIC_SKIP_EXTENDED_REVERSE = 34,
62  QIC_SKIP_EXTENDED_FORWARD = 35,
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64  QIC_CALIBRATE_TAPE_LENGTH = 36,
65  QIC_REPORT_FORMAT_SEGMENTS = 37,
66  QIC_SET_FORMAT_SEGMENTS = 38,
67  QIC_PHANTOM_SELECT = 46,
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69  QIC_PHANTOM_DESELECT = 47
70 } qic117_cmd_t;
71 typedef enum {
72  discretional = 0, required, ccs1, ccs2
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74 } qic_compatibility;
75 typedef enum {
76  unused, mode, motion, report
77 } command_types;
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 struct qic117_command_table {
80  char *name;
81  __u8 mask;
82  __u8 state;
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84  __u8 cmd_type;
85  __u8 non_intr;
86  __u8 level;
87 };
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 #define QIC117_COMMANDS {         {NULL, 0x00, 0x00, mode, 0, discretional},   {"soft reset", 0x00, 0x00, motion, 1, required},   {"report next bit", 0x00, 0x00, report, 0, required},   {"pause", 0x36, 0x24, motion, 1, required},   {"micro step pause", 0x36, 0x24, motion, 1, required},   {"alternate command timeout", 0x00, 0x00, mode, 0, required},   {"report drive status", 0x00, 0x00, report, 0, required},   {"report error code", 0x01, 0x01, report, 0, required},   {"report drive configuration",0x00, 0x00, report, 0, required},   {"report rom version", 0x00, 0x00, report, 0, required},   {"logical forward", 0x37, 0x25, motion, 0, required},   {"physical reverse", 0x17, 0x05, motion, 0, required},   {"physical forward", 0x17, 0x05, motion, 0, required},   {"seek head to track", 0x37, 0x25, motion, 0, required},   {"seek load point", 0x17, 0x05, motion, 1, required},   {"enter format mode", 0x1f, 0x05, mode, 0, required},   {"write reference burst", 0x1f, 0x05, motion, 1, required},   {"enter verify mode", 0x37, 0x25, mode, 0, required},   {"stop tape", 0x00, 0x00, motion, 1, required},   {"reserved (19)", 0x00, 0x00, unused, 0, discretional},   {"reserved (20)", 0x00, 0x00, unused, 0, discretional},   {"micro step head up", 0x02, 0x00, motion, 0, required},   {"micro step head down", 0x02, 0x00, motion, 0, required},   {"soft select", 0x00, 0x00, mode, 0, discretional},   {"soft deselect", 0x00, 0x00, mode, 0, discretional},   {"skip segments reverse", 0x36, 0x24, motion, 1, required},   {"skip segments forward", 0x36, 0x24, motion, 1, required},   {"select rate or format", 0x03, 0x01, mode, 0, required  },   {"enter diag mode 1", 0x00, 0x00, mode, 0, discretional},   {"enter diag mode 2", 0x00, 0x00, mode, 0, discretional},   {"enter primary mode", 0x00, 0x00, mode, 0, required},   {"vendor unique (31)", 0x00, 0x00, unused, 0, discretional},   {"report vendor id", 0x00, 0x00, report, 0, required},   {"report tape status", 0x04, 0x04, report, 0, ccs1},   {"skip extended reverse", 0x36, 0x24, motion, 1, ccs1},   {"skip extended forward", 0x36, 0x24, motion, 1, ccs1},   {"calibrate tape length", 0x17, 0x05, motion, 1, ccs2},   {"report format segments", 0x17, 0x05, report, 0, ccs2},   {"set format segments", 0x17, 0x05, mode, 0, ccs2},   {"reserved (39)", 0x00, 0x00, unused, 0, discretional},   {"vendor unique (40)", 0x00, 0x00, unused, 0, discretional},   {"vendor unique (41)", 0x00, 0x00, unused, 0, discretional},   {"vendor unique (42)", 0x00, 0x00, unused, 0, discretional},   {"vendor unique (43)", 0x00, 0x00, unused, 0, discretional},   {"vendor unique (44)", 0x00, 0x00, unused, 0, discretional},   {"vendor unique (45)", 0x00, 0x00, unused, 0, discretional},   {"phantom select", 0x00, 0x00, mode, 0, discretional},   {"phantom deselect", 0x00, 0x00, mode, 0, discretional}, }
90 #define QIC_STATUS_READY 0x01
91 #define QIC_STATUS_ERROR 0x02
92 #define QIC_STATUS_CARTRIDGE_PRESENT 0x04
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94 #define QIC_STATUS_WRITE_PROTECT 0x08
95 #define QIC_STATUS_NEW_CARTRIDGE 0x10
96 #define QIC_STATUS_REFERENCED 0x20
97 #define QIC_STATUS_AT_BOT 0x40
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99 #define QIC_STATUS_AT_EOT 0x80
100 #define QIC_CONFIG_RATE_MASK 0x18
101 #define QIC_CONFIG_RATE_SHIFT 3
102 #define QIC_CONFIG_RATE_250 0
103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104 #define QIC_CONFIG_RATE_500 2
105 #define QIC_CONFIG_RATE_1000 3
106 #define QIC_CONFIG_RATE_2000 1
107 #define QIC_CONFIG_RATE_4000 0
108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109 #define QIC_CONFIG_LONG 0x40
110 #define QIC_CONFIG_80 0x80
111 #define QIC_TAPE_STD_MASK 0x0f
112 #define QIC_TAPE_QIC40 0x01
113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114 #define QIC_TAPE_QIC80 0x02
115 #define QIC_TAPE_QIC3020 0x03
116 #define QIC_TAPE_QIC3010 0x04
117 #define QIC_TAPE_LEN_MASK 0x70
118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119 #define QIC_TAPE_205FT 0x10
120 #define QIC_TAPE_307FT 0x20
121 #define QIC_TAPE_VARIABLE 0x30
122 #define QIC_TAPE_1100FT 0x40
123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124 #define QIC_TAPE_FLEX 0x60
125 #define QIC_TAPE_WIDE 0x80
126 #define QIC_TOP_TAPE_LEN 1500
127 typedef struct {
128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129  char *message;
130  unsigned int fatal:1;
131 } ftape_error;
132 #define QIC117_ERRORS {    { "No error", 0, },    { "Command Received while Drive Not Ready", 0, },    { "Cartridge Not Present or Removed", 1, },    { "Motor Speed Error (not within 1%)", 1, },    { "Motor Speed Fault (jammed, or gross speed error", 1, },    { "Cartridge Write Protected", 1, },    { "Undefined or Reserved Command Code", 1, },    { "Illegal Track Address Specified for Seek", 1, },    { "Illegal Command in Report Subcontext", 0, },    { "Illegal Entry into a Diagnostic Mode", 1, },    { "Broken Tape Detected (based on hole sensor)", 1, },    { "Warning--Read Gain Setting Error", 1, },    { "Command Received While Error Status Pending (obs)", 1, },    { "Command Received While New Cartridge Pending", 1, },    { "Command Illegal or Undefined in Primary Mode", 1, },    { "Command Illegal or Undefined in Format Mode", 1, },    { "Command Illegal or Undefined in Verify Mode", 1, },    { "Logical Forward Not at Logical BOT or no Format Segments in Format Mode", 1, },    { "Logical EOT Before All Segments generated", 1, },    { "Command Illegal When Cartridge Not Referenced", 1, },    { "Self-Diagnostic Failed (cannot be cleared)", 1, },    { "Warning EEPROM Not Initialized, Defaults Set", 1, },    { "EEPROM Corrupted or Hardware Failure", 1, },    { "Motion Time-out Error", 1, },    { "Data Segment Too Long -- Logical Forward or Pause", 1, },    { "Transmit Overrun (obs)", 1, },    { "Power On Reset Occurred", 0, },    { "Software Reset Occurred", 0, },    { "Diagnostic Mode 1 Error", 1, },    { "Diagnostic Mode 2 Error", 1, },    { "Command Received During Non-Interruptible Process", 1, },    { "Rate or Format Selection Error", 1, },    { "Illegal Command While in High Speed Mode", 1, },    { "Illegal Seek Segment Value", 1, },    { "Invalid Media", 1, },    { "Head Positioning Failure", 1, },    { "Write Reference Burst Failure", 1, },    { "Prom Code Missing", 1, },    { "Invalid Format", 1, },    { "EOT/BOT System Failure", 1, },    { "Prom A Checksum Error", 1, },    { "Drive Wakeup Reset Occurred", 1, },    { "Prom B Checksum Error", 1, },    { "Illegal Entry into Format Mode", 1, }, }
133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134 #endif
135