Linux kernel & device driver programming

Cross-Referenced Linux and Device Driver Code

[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ]
Version: [ 2.6.11.8 ] [ 2.6.25 ] [ 2.6.25.8 ] [ 2.6.31.13 ] Architecture: [ i386 ]

Diff markup

Differences between /linux/drivers/scsi/psi_roy.h (Version 2.6.11.8) and /linux/drivers/scsi/psi_roy.h (Version 2.6.25)


  1 /*********************************************      1 
  2  * Perceptive Solutions, Inc. PCI-2000 device     
  3  *                                                
  4  * psi_roy.h - Linux Host Driver for PCI-2000     
  5  *                                                
  6  * Copyright (c) 1997-1999 Perceptive Solution    
  7  * All Rights Reserved.                           
  8  *                                                
  9  * Redistribution and use in source and binary    
 10  * modification, are permitted provided that r    
 11  * code retain the above copyright notice and     
 12  * modification.                                  
 13  *                                                
 14  * Technical updates and product information a    
 15  *  http://www.psidisk.com                        
 16  *                                                
 17  * Please send questions, comments, bug report    
 18  *  tech@psidisk.com Technical Support            
 19  *                                                
 20  *********************************************    
 21                                                   
 22 #ifndef ROY_HOST                                  
 23 #define ROY_HOST                                  
 24                                                   
 25 /*********************************************    
 26 /*              PCI setup                         
 27 /*********************************************    
 28 #define VENDOR_PSI                      0x1256    
 29 #define DEVICE_ROY_1            0x5201            
 30                                                   
 31 /*********************************************    
 32 /*              controller constants              
 33 /*********************************************    
 34 #define MAXADAPTER                      4         
 35 #define MAX_BUS                         2         
 36 #define MAX_UNITS                       16        
 37 #define TIMEOUT_COMMAND         400               
 38                                                   
 39 /*********************************************    
 40 /*              I/O address offsets               
 41 /*********************************************    
 42 #define RTR_MAILBOX                               
 43 #define RTR_LOCAL_DOORBELL                        
 44 #define RTR_PCI_DOORBELL                          
 45                                                   
 46 /*********************************************    
 47 /*                                                
 48 /*                      Host command codes        
 49 /*                                                
 50 /*********************************************    
 51 #define CMD_READ_CHS            0x01              
 52 #define CMD_READ                        0x02      
 53 #define CMD_READ_SG                     0x03      
 54 #define CMD_WRITE_CHS           0x04              
 55 #define CMD_WRITE                       0x05      
 56 #define CMD_WRITE_SG            0x06              
 57 #define CMD_READ_CHS_SG         0x07              
 58 #define CMD_WRITE_CHS_SG        0x08              
 59 #define CMD_VERIFY_CHS          0x09              
 60 #define CMD_VERIFY                      0x0A      
 61 #define CMD_DASD_CDB            0x0B              
 62 #define CMD_DASD_CDB_SG         0x0C              
 63                                                   
 64 #define CMD_READ_ABS            0x10              
 65 #define CMD_WRITE_ABS           0x11              
 66 #define CMD_VERIFY_ABS          0x12              
 67 #define CMD_TEST_READY          0x13              
 68 #define CMD_LOCK_DOOR           0x14              
 69 #define CMD_UNLOCK_DOOR         0x15              
 70 #define CMD_EJECT_MEDIA         0x16              
 71 #define CMD_UPDATE_CAP          0x17              
 72 #define CMD_TEST_PRIV           0x18              
 73                                                   
 74                                                   
 75 #define CMD_SCSI_THRU           0x30              
 76 #define CMD_SCSI_THRU_SG        0x31              
 77 #define CMD_SCSI_REQ_SENSE      0x32              
 78                                                   
 79 #define CMD_DASD_RAID_RQ        0x35              
 80 #define CMD_DASD_RAID_RQ0       0x31              
 81 #define CMD_DASD_RAID_RQ1       0x32              
 82 #define CMD_DASD_RAID_RQ5       0x33              
 83                                                   
 84 #define CMD_DASD_SCSI_INQ       0x36              
 85 #define CMD_DASD_CAP            0x37              
 86 #define CMD_DASD_INQ            0x38              
 87 #define CMD_SCSI_INQ            0x39              
 88 #define CMD_READ_SETUP          0x3A              
 89 #define CMD_WRITE_SETUP         0x3B              
 90 #define CMD_READ_CONFIG         0x3C              
 91 #define CMD_WRITE_CONFIG        0x3D              
 92                                                   
 93 #define CMD_TEXT_DEVICE         0x3E              
 94 #define CMD_TEXT_SIGNON         0x3F              
 95                                                   
 96 #define CMD_QUEUE                       0x40      
 97                                                   
 98 #define CMD_PREFETCH            0x40              
 99 #define CMD_TEST_WRITE          0x41              
100 #define CMD_LAST_STATUS         0x42              
101 #define CMD_ABORT                       0x43      
102 #define CMD_ERROR                       0x44      
103 #define CMD_DONE                        0x45      
104 #define CMD_DIAGNOSTICS         0x46              
105 #define CMD_FEATURE_MODE        0x47              
106 #define CMD_DASD_INQUIRE        0x48              
107 #define CMD_FEATURE_QUERY       0x49              
108 #define CMD_DASD_EJECT          0x4A              
109 #define CMD_DASD_LOCK           0x4B              
110 #define CMD_DASD_TYPE           0x4C              
111 #define CMD_NUM_DEV                     0x4D      
112 #define CMD_GET_PARMS           0x4E              
113 #define CMD_SPECIFY                     0x4F      
114                                                   
115 #define CMD_RAID_GET_DEV        0x50              
116 #define CMD_RAID_READ           0x51              
117 #define CMD_RAID_WRITE          0x52              
118 #define CMD_RAID_LITEUP         0x53              
119 #define CMD_RAID_REBUILD        0x54              
120 #define CMD_RAID_MUTE           0x55              
121 #define CMD_RAID_FAIL           0x56              
122 #define CMD_RAID_STATUS         0x57              
123 #define CMD_RAID_STOP           0x58              
124 #define CMD_RAID_START          0x59              
125 #define CMD_RAID0_READ          0x5A              
126 #define CMD_RAID0_WRITE         0x5B              
127 #define CMD_RAID5_READ          0x5C              
128 #define CMD_RAID5_WRITE         0x5D              
129                                                   
130 #define CMD_ERASE_TABLES        0x5F              
131                                                   
132 #define CMD_SCSI_GET            0x60              
133 #define CMD_SCSI_TIMEOUT        0x61              
134 #define CMD_SCSI_ERROR          0x62              
135 #define CMD_GET_SPARMS          0x63              
136 #define CMD_SCSI_ABORT          0x64              
137                                                   
138 #define CMD_CHIRP_CHIRP         0x77              
139 #define CMD_GET_LAST_DONE       0x78              
140 #define CMD_GET_FEATURES        0x79              
141 #define CMD_CLEAR_CACHE         0x7A              
142 #define CMD_BIOS_TEST           0x7B              
143 #define CMD_WAIT_FLUSH          0x7C              
144 #define CMD_RESET_BUS           0x7D              
145 #define CMD_STARTUP_QRY         0x7E              
146 #define CMD_RESET                       0x7F      
147                                                   
148 #define CMD_RESTART_RESET       0x80              
149 #define CMD_SOFT_RESET          0x81              
150                                                   
151 /*********************************************    
152 /*                                                
153 /*                              Host return er    
154 /*                                                
155 /*********************************************    
156 #define ERR08_TAGGED            0x80              
157                                                   
158 #define ERR16_NONE                      0x0000    
159 #define ERR16_SC_COND_MET       0x0004            
160 #define ERR16_CMD                       0x0101    
161 #define ERR16_SC_CHECK_COND     0x0002            
162 #define ERR16_CMD_NOT           0x0201            
163 #define ERR16_NO_DEVICE     0x0301                
164 #define ERR16_SECTOR            0x0202            
165 #define ERR16_PROTECT           0x0303            
166 #define ERR16_NOSECTOR          0x0404            
167 #define ERR16_MEDIA                     0x0C0C    
168 #define ERR16_CONTROL           0x2020            
169 #define ERR16_CONTROL_DMA       0x2120            
170 #define ERR16_NO_ALARM          0x2220            
171 #define ERR16_OP_BUSY           0x2320            
172 #define ERR16_SEEK                      0x4040    
173 #define ERR16_DEVICE_FAIL       0x4140            
174 #define ERR16_TIMEOUT           0x8080            
175 #define ERR16_DEV_NOT_READY     0xAAAA            
176 #define ERR16_UNDEFINED         0xBBBB            
177 #define ERR16_WRITE_FAULT       0xCCCC            
178 #define ERR16_INVALID_DEV       0x4001            
179 #define ERR16_DEVICE_BUSY       0x4002            
180 #define ERR16_MEMORY            0x4003            
181 #define ERR16_NO_FEATURE        0x40FA            
182 #define ERR16_NOTAG                     0x40FD    
183 #define ERR16_NOT_READY         0x40FE            
184 #define ERR16_SETUP_FLASH       0x5050            
185 #define ERR16_SETUP_SIZE        0x5051            
186 #define ERR16_SENSE                     0xFFFF    
187 #define ERR16_SC_BUSY           0x0008            
188 #define ERR16_SC_RES_CONFL      0x0018            
189 #define ERR16_SC_CMD_TERM       0x0022            
190 #define ERR16_SC_OTHER          0x00FF            
191 #define ERR16_MEDIA_CHANGED     0x8001            
192                                                   
193 #define ERR32_NONE                      0x0000    
194 #define ERR32_SC_COND_MET       0x00000004        
195 #define ERR32_CMD                       0x0001    
196 #define ERR32_SC_CHECK_COND     0x00020002        
197 #define ERR32_CMD_NOT           0x00030201        
198 #define ERR32_NO_DEVICE     0x00040301  /* inv    
199 #define ERR32_SECTOR            0x00050202        
200 #define ERR32_PROTECT           0x00060303        
201 #define ERR32_NOSECTOR          0x00070404        
202 #define ERR32_MEDIA                     0x0008    
203 #define ERR32_CONTROL           0x00092020        
204 #define ERR32_CONTROL_DMA       0x000A2120        
205 #define ERR32_NO_ALARM          0x000B2220        
206 #define ERR32_OP_BUSY           0x000C2320        
207 #define ERR32_SEEK                      0x000D    
208 #define ERR32_DEVICE_FAIL       0x000E4140        
209 #define ERR32_TIMEOUT           0x000F8080        
210 #define ERR32_DEV_NOT_READY     0x0010AAAA        
211 #define ERR32_UNDEFINED         0x0011BBBB        
212 #define ERR32_WRITE_FAULT       0x0012CCCC        
213 #define ERR32_INVALID_DEV       0x00134001        
214 #define ERR32_DEVICE_BUSY       0x00144002        
215 #define ERR32_MEMORY            0x00154003        
216 #define ERR32_NO_FEATURE        0x001640FA        
217 #define ERR32_NOTAG                     0x0017    
218 #define ERR32_NOT_READY         0x001840FE        
219 #define ERR32_SETUP_FLASH       0x00195050        
220 #define ERR32_SETUP_SIZE        0x001A5051        
221 #define ERR32_SENSE                     0x001B    
222 #define ERR32_SC_BUSY           0x001C0008        
223 #define ERR32_SC_RES_CONFL      0x001D0018        
224 #define ERR32_SC_CMD_TERM       0x001E0022        
225 #define ERR32_SC_OTHER          0x001F00FF        
226 #define ERR32_MEDIA_CHANGED     0x00208001        
227                                                   
228 /*********************************************    
229 /*                                                
230 /*      Host Operating System specification co    
231 /*                                                
232 /*********************************************    
233 #define SPEC_INTERRUPT          0x80              
234 #define SPEC_BACKWARD_SG        0x40              
235 #define SPEC_DOS_BLOCK          0x01              
236 #define SPEC_OS2_V3                     0x02      
237 #define SPCE_SCO_3242           0x04              
238 #define SPEC_QNX_4X                     0x05      
239 #define SPEC_NOVELL_NWPA        0x08              
240                                                   
241 /*********************************************    
242 /*                                                
243 /*      Inquire structures                        
244 /*                                                
245 /*********************************************    
246 typedef struct  _CNT_SCSI_INQ                     
247         {                                         
248         UCHAR   devt;                             
249         UCHAR   devtm;                            
250         UCHAR   svers;                            
251         UCHAR   rfmt;                             
252         UCHAR   adlen;                            
253         UCHAR   res1;                             
254         UCHAR   res2;                             
255         UCHAR   fncs;                             
256         UCHAR   vid[8];                           
257         UCHAR   pid[16];                          
258         UCHAR   rev[4];                           
259         }       CNT_SCSI_INQ;                     
260                                                   
261 typedef struct  _CNT_IDE_INQ                      
262         {                                         
263         USHORT  GeneralConfiguration;             
264         USHORT  NumberOfCylinders;                
265         USHORT  Reserved1;                        
266         USHORT  NumberOfHeads;                    
267         USHORT  UnformattedBytesPerTrack;         
268         USHORT  UnformattedBytesPerSector;        
269         USHORT  SectorsPerTrack;                  
270         USHORT  VendorUnique1[3];                 
271         USHORT  SerialNumber[10];                 
272         USHORT  BufferType;                       
273         USHORT  BufferSectorSize;                 
274         USHORT  NumberOfEccBytes;                 
275         USHORT  FirmwareRevision[4];              
276         USHORT  ModelNumber[20];                  
277         UCHAR   MaximumBlockTransfer;             
278         UCHAR   VendorUnique2;                    
279         USHORT  DoubleWordIo;                     
280         USHORT  Capabilities;                     
281         USHORT  Reserved2;                        
282         UCHAR   VendorUnique3;                    
283         UCHAR   PioCycleTimingMode;               
284         UCHAR   VendorUnique4;                    
285         UCHAR   DmaCycleTimingMode;               
286         USHORT  TranslationFieldsValid;           
287         USHORT  NumberOfCurrentCylinders;         
288         USHORT  NumberOfCurrentHeads;             
289         USHORT  CurrentSectorsPerTrack;           
290         ULONG   CurrentSectorCapacity;            
291         }       CNT_IDE_INQ;                      
292                                                   
293 typedef struct  _DASD_INQUIRE                     
294         {                                         
295         ULONG   type;                             
296         union                                     
297                 {                                 
298                 CNT_SCSI_INQ    scsi;             
299                 CNT_IDE_INQ             ide;      
300                 }       inq;                      
301         }       DASD_INQUIRE;                     
302                                                   
303 /*********************************************    
304 /*                                                
305 /*      Device Codes                              
306 /*                                                
307 /*********************************************    
308 #define DEVC_DASD                       0x00      
309 #define DEVC_SEQACESS           0x01              
310 #define DEVC_PRINTER            0x02              
311 #define DEVC_PROCESSOR          0x03              
312 #define DEVC_WRITEONCE          0x04              
313 #define DEVC_CDROM                      0x05      
314 #define DEVC_SCANNER            0x06              
315 #define DEVC_OPTICAL            0x07              
316 #define DEVC_MEDCHGR            0x08              
317 #define DEVC_DASD_REMOVABLE     0x80              
318 #define DEVC_NONE                       0xFF      
319                                                   
320 // SCSI controls for RAID                         
321 #define SC_MY_RAID                      0xBF      
322 #define MY_SCSI_QUERY0          0x31              
323 #define MY_SCSI_QUERY1          0x32              
324 #define MY_SCSI_QUERY5          0x33              
325 #define MY_SCSI_REBUILD         0x40              
326 #define MY_SCSI_DEMOFAIL        0x54              
327 #define MY_SCSI_ALARMMUTE       0x60              
328                                                   
329                                                   
330 #endif                                            
331                                                   
332                                                   
  This page was automatically generated by the LXR engine.