root / hw / scsi-defs.h @ 70cca6d8
History | View | Annotate | Download (5 kB)
1 | 0d65e1f8 | Gerd Hoffmann | /* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
|
---|---|---|---|
2 | 0d65e1f8 | Gerd Hoffmann | This file is part of the GNU C Library.
|
3 | 0d65e1f8 | Gerd Hoffmann | |
4 | 0d65e1f8 | Gerd Hoffmann | The GNU C Library is free software; you can redistribute it and/or
|
5 | 0d65e1f8 | Gerd Hoffmann | modify it under the terms of the GNU Lesser General Public
|
6 | 0d65e1f8 | Gerd Hoffmann | License as published by the Free Software Foundation; either
|
7 | 0d65e1f8 | Gerd Hoffmann | version 2.1 of the License, or (at your option) any later version.
|
8 | 0d65e1f8 | Gerd Hoffmann | |
9 | 0d65e1f8 | Gerd Hoffmann | The GNU C Library is distributed in the hope that it will be useful,
|
10 | 0d65e1f8 | Gerd Hoffmann | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11 | 0d65e1f8 | Gerd Hoffmann | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
12 | 0d65e1f8 | Gerd Hoffmann | Lesser General Public License for more details.
|
13 | 0d65e1f8 | Gerd Hoffmann | |
14 | 0d65e1f8 | Gerd Hoffmann | You should have received a copy of the GNU Lesser General Public
|
15 | 0d65e1f8 | Gerd Hoffmann | License along with the GNU C Library; if not, write to the Free
|
16 | 0d65e1f8 | Gerd Hoffmann | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
17 | 0d65e1f8 | Gerd Hoffmann | 02111-1307 USA. */
|
18 | 0d65e1f8 | Gerd Hoffmann | |
19 | 0d65e1f8 | Gerd Hoffmann | /*
|
20 | 0d65e1f8 | Gerd Hoffmann | * This header file contains public constants and structures used by
|
21 | 0d65e1f8 | Gerd Hoffmann | * the scsi code for linux.
|
22 | 0d65e1f8 | Gerd Hoffmann | */
|
23 | 0d65e1f8 | Gerd Hoffmann | |
24 | 0d65e1f8 | Gerd Hoffmann | /*
|
25 | 0d65e1f8 | Gerd Hoffmann | * SCSI opcodes
|
26 | 0d65e1f8 | Gerd Hoffmann | */
|
27 | 0d65e1f8 | Gerd Hoffmann | |
28 | 0d65e1f8 | Gerd Hoffmann | #define TEST_UNIT_READY 0x00 |
29 | 0d65e1f8 | Gerd Hoffmann | #define REZERO_UNIT 0x01 |
30 | 0d65e1f8 | Gerd Hoffmann | #define REQUEST_SENSE 0x03 |
31 | 0d65e1f8 | Gerd Hoffmann | #define FORMAT_UNIT 0x04 |
32 | 0d65e1f8 | Gerd Hoffmann | #define READ_BLOCK_LIMITS 0x05 |
33 | 0d65e1f8 | Gerd Hoffmann | #define REASSIGN_BLOCKS 0x07 |
34 | 0d65e1f8 | Gerd Hoffmann | #define READ_6 0x08 |
35 | 0d65e1f8 | Gerd Hoffmann | #define WRITE_6 0x0a |
36 | 0d65e1f8 | Gerd Hoffmann | #define SEEK_6 0x0b |
37 | 0d65e1f8 | Gerd Hoffmann | #define READ_REVERSE 0x0f |
38 | 0d65e1f8 | Gerd Hoffmann | #define WRITE_FILEMARKS 0x10 |
39 | 0d65e1f8 | Gerd Hoffmann | #define SPACE 0x11 |
40 | 0d65e1f8 | Gerd Hoffmann | #define INQUIRY 0x12 |
41 | 0d65e1f8 | Gerd Hoffmann | #define RECOVER_BUFFERED_DATA 0x14 |
42 | 0d65e1f8 | Gerd Hoffmann | #define MODE_SELECT 0x15 |
43 | 0d65e1f8 | Gerd Hoffmann | #define RESERVE 0x16 |
44 | 0d65e1f8 | Gerd Hoffmann | #define RELEASE 0x17 |
45 | 0d65e1f8 | Gerd Hoffmann | #define COPY 0x18 |
46 | 0d65e1f8 | Gerd Hoffmann | #define ERASE 0x19 |
47 | 0d65e1f8 | Gerd Hoffmann | #define MODE_SENSE 0x1a |
48 | 0d65e1f8 | Gerd Hoffmann | #define START_STOP 0x1b |
49 | 0d65e1f8 | Gerd Hoffmann | #define RECEIVE_DIAGNOSTIC 0x1c |
50 | 0d65e1f8 | Gerd Hoffmann | #define SEND_DIAGNOSTIC 0x1d |
51 | 0d65e1f8 | Gerd Hoffmann | #define ALLOW_MEDIUM_REMOVAL 0x1e |
52 | 0d65e1f8 | Gerd Hoffmann | |
53 | 0d65e1f8 | Gerd Hoffmann | #define SET_WINDOW 0x24 |
54 | 0d65e1f8 | Gerd Hoffmann | #define READ_CAPACITY 0x25 |
55 | 0d65e1f8 | Gerd Hoffmann | #define READ_10 0x28 |
56 | 0d65e1f8 | Gerd Hoffmann | #define WRITE_10 0x2a |
57 | 0d65e1f8 | Gerd Hoffmann | #define SEEK_10 0x2b |
58 | 0d65e1f8 | Gerd Hoffmann | #define WRITE_VERIFY 0x2e |
59 | 0d65e1f8 | Gerd Hoffmann | #define VERIFY 0x2f |
60 | 0d65e1f8 | Gerd Hoffmann | #define SEARCH_HIGH 0x30 |
61 | 0d65e1f8 | Gerd Hoffmann | #define SEARCH_EQUAL 0x31 |
62 | 0d65e1f8 | Gerd Hoffmann | #define SEARCH_LOW 0x32 |
63 | 0d65e1f8 | Gerd Hoffmann | #define SET_LIMITS 0x33 |
64 | 0d65e1f8 | Gerd Hoffmann | #define PRE_FETCH 0x34 |
65 | 0d65e1f8 | Gerd Hoffmann | #define READ_POSITION 0x34 |
66 | 0d65e1f8 | Gerd Hoffmann | #define SYNCHRONIZE_CACHE 0x35 |
67 | 0d65e1f8 | Gerd Hoffmann | #define LOCK_UNLOCK_CACHE 0x36 |
68 | 0d65e1f8 | Gerd Hoffmann | #define READ_DEFECT_DATA 0x37 |
69 | 0d65e1f8 | Gerd Hoffmann | #define MEDIUM_SCAN 0x38 |
70 | 0d65e1f8 | Gerd Hoffmann | #define COMPARE 0x39 |
71 | 0d65e1f8 | Gerd Hoffmann | #define COPY_VERIFY 0x3a |
72 | 0d65e1f8 | Gerd Hoffmann | #define WRITE_BUFFER 0x3b |
73 | 0d65e1f8 | Gerd Hoffmann | #define READ_BUFFER 0x3c |
74 | 0d65e1f8 | Gerd Hoffmann | #define UPDATE_BLOCK 0x3d |
75 | 0d65e1f8 | Gerd Hoffmann | #define READ_LONG 0x3e |
76 | 0d65e1f8 | Gerd Hoffmann | #define WRITE_LONG 0x3f |
77 | 0d65e1f8 | Gerd Hoffmann | #define CHANGE_DEFINITION 0x40 |
78 | 0d65e1f8 | Gerd Hoffmann | #define WRITE_SAME 0x41 |
79 | 0d65e1f8 | Gerd Hoffmann | #define READ_TOC 0x43 |
80 | 0d65e1f8 | Gerd Hoffmann | #define LOG_SELECT 0x4c |
81 | 0d65e1f8 | Gerd Hoffmann | #define LOG_SENSE 0x4d |
82 | 0d65e1f8 | Gerd Hoffmann | #define MODE_SELECT_10 0x55 |
83 | 0d65e1f8 | Gerd Hoffmann | #define RESERVE_10 0x56 |
84 | 0d65e1f8 | Gerd Hoffmann | #define RELEASE_10 0x57 |
85 | 0d65e1f8 | Gerd Hoffmann | #define MODE_SENSE_10 0x5a |
86 | 0d65e1f8 | Gerd Hoffmann | #define PERSISTENT_RESERVE_IN 0x5e |
87 | 0d65e1f8 | Gerd Hoffmann | #define PERSISTENT_RESERVE_OUT 0x5f |
88 | 0d65e1f8 | Gerd Hoffmann | #define MOVE_MEDIUM 0xa5 |
89 | 0d65e1f8 | Gerd Hoffmann | #define READ_12 0xa8 |
90 | 0d65e1f8 | Gerd Hoffmann | #define WRITE_12 0xaa |
91 | 0d65e1f8 | Gerd Hoffmann | #define WRITE_VERIFY_12 0xae |
92 | 0d65e1f8 | Gerd Hoffmann | #define SEARCH_HIGH_12 0xb0 |
93 | 0d65e1f8 | Gerd Hoffmann | #define SEARCH_EQUAL_12 0xb1 |
94 | 0d65e1f8 | Gerd Hoffmann | #define SEARCH_LOW_12 0xb2 |
95 | 0d65e1f8 | Gerd Hoffmann | #define READ_ELEMENT_STATUS 0xb8 |
96 | 0d65e1f8 | Gerd Hoffmann | #define SEND_VOLUME_TAG 0xb6 |
97 | 0d65e1f8 | Gerd Hoffmann | #define WRITE_LONG_2 0xea |
98 | 0d65e1f8 | Gerd Hoffmann | |
99 | 0d65e1f8 | Gerd Hoffmann | /* from hw/scsi-generic.c */
|
100 | 0d65e1f8 | Gerd Hoffmann | #define REWIND 0x01 |
101 | 0d65e1f8 | Gerd Hoffmann | #define REPORT_DENSITY_SUPPORT 0x44 |
102 | 38215553 | Gerd Hoffmann | #define GET_CONFIGURATION 0x46 |
103 | bd536cf3 | Gerd Hoffmann | #define READ_16 0x88 |
104 | bd536cf3 | Gerd Hoffmann | #define WRITE_16 0x8a |
105 | bd536cf3 | Gerd Hoffmann | #define WRITE_VERIFY_16 0x8e |
106 | 5dd90e2a | Gerd Hoffmann | #define SERVICE_ACTION_IN 0x9e |
107 | 39ec9a50 | Gerd Hoffmann | #define REPORT_LUNS 0xa0 |
108 | 0d65e1f8 | Gerd Hoffmann | #define LOAD_UNLOAD 0xa6 |
109 | 0d65e1f8 | Gerd Hoffmann | #define SET_CD_SPEED 0xbb |
110 | 0d65e1f8 | Gerd Hoffmann | #define BLANK 0xa1 |
111 | 0d65e1f8 | Gerd Hoffmann | |
112 | 0d65e1f8 | Gerd Hoffmann | /*
|
113 | 0d65e1f8 | Gerd Hoffmann | * Status codes
|
114 | 0d65e1f8 | Gerd Hoffmann | */
|
115 | 0d65e1f8 | Gerd Hoffmann | |
116 | 0d65e1f8 | Gerd Hoffmann | #define GOOD 0x00 |
117 | 0d65e1f8 | Gerd Hoffmann | #define CHECK_CONDITION 0x01 |
118 | 0d65e1f8 | Gerd Hoffmann | #define CONDITION_GOOD 0x02 |
119 | 0d65e1f8 | Gerd Hoffmann | #define BUSY 0x04 |
120 | 0d65e1f8 | Gerd Hoffmann | #define INTERMEDIATE_GOOD 0x08 |
121 | 0d65e1f8 | Gerd Hoffmann | #define INTERMEDIATE_C_GOOD 0x0a |
122 | 0d65e1f8 | Gerd Hoffmann | #define RESERVATION_CONFLICT 0x0c |
123 | 0d65e1f8 | Gerd Hoffmann | #define COMMAND_TERMINATED 0x11 |
124 | 0d65e1f8 | Gerd Hoffmann | #define QUEUE_FULL 0x14 |
125 | 0d65e1f8 | Gerd Hoffmann | |
126 | 0d65e1f8 | Gerd Hoffmann | #define STATUS_MASK 0x3e |
127 | 0d65e1f8 | Gerd Hoffmann | |
128 | 0d65e1f8 | Gerd Hoffmann | /*
|
129 | 0d65e1f8 | Gerd Hoffmann | * SENSE KEYS
|
130 | 0d65e1f8 | Gerd Hoffmann | */
|
131 | 0d65e1f8 | Gerd Hoffmann | |
132 | 0d65e1f8 | Gerd Hoffmann | #define NO_SENSE 0x00 |
133 | 0d65e1f8 | Gerd Hoffmann | #define RECOVERED_ERROR 0x01 |
134 | 0d65e1f8 | Gerd Hoffmann | #define NOT_READY 0x02 |
135 | 0d65e1f8 | Gerd Hoffmann | #define MEDIUM_ERROR 0x03 |
136 | 0d65e1f8 | Gerd Hoffmann | #define HARDWARE_ERROR 0x04 |
137 | 0d65e1f8 | Gerd Hoffmann | #define ILLEGAL_REQUEST 0x05 |
138 | 0d65e1f8 | Gerd Hoffmann | #define UNIT_ATTENTION 0x06 |
139 | 0d65e1f8 | Gerd Hoffmann | #define DATA_PROTECT 0x07 |
140 | 0d65e1f8 | Gerd Hoffmann | #define BLANK_CHECK 0x08 |
141 | 0d65e1f8 | Gerd Hoffmann | #define COPY_ABORTED 0x0a |
142 | 0d65e1f8 | Gerd Hoffmann | #define ABORTED_COMMAND 0x0b |
143 | 0d65e1f8 | Gerd Hoffmann | #define VOLUME_OVERFLOW 0x0d |
144 | 0d65e1f8 | Gerd Hoffmann | #define MISCOMPARE 0x0e |
145 | 0d65e1f8 | Gerd Hoffmann | |
146 | 0d65e1f8 | Gerd Hoffmann | |
147 | 0d65e1f8 | Gerd Hoffmann | /*
|
148 | 0d65e1f8 | Gerd Hoffmann | * DEVICE TYPES
|
149 | 0d65e1f8 | Gerd Hoffmann | */
|
150 | 0d65e1f8 | Gerd Hoffmann | |
151 | 0d65e1f8 | Gerd Hoffmann | #define TYPE_DISK 0x00 |
152 | 0d65e1f8 | Gerd Hoffmann | #define TYPE_TAPE 0x01 |
153 | 0d65e1f8 | Gerd Hoffmann | #define TYPE_PROCESSOR 0x03 /* HP scanners use this */ |
154 | 0d65e1f8 | Gerd Hoffmann | #define TYPE_WORM 0x04 /* Treated as ROM by our system */ |
155 | 0d65e1f8 | Gerd Hoffmann | #define TYPE_ROM 0x05 |
156 | 0d65e1f8 | Gerd Hoffmann | #define TYPE_SCANNER 0x06 |
157 | 0d65e1f8 | Gerd Hoffmann | #define TYPE_MOD 0x07 /* Magneto-optical disk - |
158 | 0d65e1f8 | Gerd Hoffmann | * - treated as TYPE_DISK */
|
159 | 0d65e1f8 | Gerd Hoffmann | #define TYPE_MEDIUM_CHANGER 0x08 |
160 | 0d65e1f8 | Gerd Hoffmann | #define TYPE_ENCLOSURE 0x0d /* Enclosure Services Device */ |
161 | 0d65e1f8 | Gerd Hoffmann | #define TYPE_NO_LUN 0x7f |