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